“我怎么能说?”;在HTML属性值中
我希望有以下资料:“我怎么能说?”;在HTML属性值中,html,escaping,html-entities,quotations,Html,Escaping,Html Entities,Quotations,我希望有以下资料: <span title="This is a "good" title.">Catch me in the rice.</span> 在米饭里抓我。 很明显,浏览器无法很好地呈现这一点。请向我提供什么转义序列或编码的信息,如“我必须使用”使用“。抓住我的机会。 <span title="This is a "good" title.">Catch me in the rise.</span>
<span title="This is a "good" title.">Catch me in the rice.</span>
在米饭里抓我。
很明显,浏览器无法很好地呈现这一点。请向我提供什么转义序列或编码的信息,如“我必须使用”使用“
。抓住我的机会。
<span title="This is a "good" title.">Catch me in the rise.</span>
用相应的HTML实体替换引号-例如,“
或&34;
)-如下所示:
<span title="This is a "good" title.">Catch me in the rice.</span>
<span title="This is a "good" title.">Catch me in the rice.</span>
在米饭里抓我。
在米饭里抓我。
或者,如果属性值中需要双引号,则可以在HTML中使用单引号:
<span title='This is a "good" title.'>Catch me in the rice.</span>
在米饭里抓我。
太快了。让我试试这个。当他需要的文本中有一个单引号时,单引号将不起作用……始终使用实体。@gms8994当然是像