[英]How to display ;amp& in HTML?
I have to display this exact string in HTML: 我必须在HTML中显示这个确切的字符串:
;amp&
When I try it always changes to "&". 当我尝试它时总是改为“&”。
How to fix that? 如何解决?
If you mean &
如果你的意思是
&
, then you need to double escape it: ,那么你需要双重逃避它:
&
Assuming you actually meant &
假设你真的意味着
&
, you just need to escape the &
: use the HTML code &
,你只需要逃避
&
:使用HTML代码&
. 。
I guess you mean &
我想你的意思是
&
Why don't you do the following: &
你为什么不做以下事情:
&
? ?
;amp&
= ;amp&
I guess you meant 我猜你的意思
&
Because that DOES change into "&". 因为那会变成“&”。 Anyway - you will have to escape the ampersand.
无论如何 - 你将不得不逃脱&符号。
So - replace "&" with "&" like: 所以 - 用“&”代替“&”,如:
&
There is also the html entity for ampersand - &
还有用于&符号的html实体 -
&
, so if you want to print &
,所以如果你想打印
&
, just use &
,只需使用
&
If you want to display this exact string 如果要显示此确切字符串
;amp&
Then you you should do this... 那么你应该这样做......
;amp&
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.