html – Internet Explorer – 注释结束警告中的意外字符

html – Internet Explorer – 注释结束警告中的意外字符,第1张

概述Internet Explorer抱怨评论中的url中有两个破折号: <!--<iframe src="/file.php?var=AQJ--dsf"></iframe>--> HTML1416: Unexpected character in comment end. Expected “–>”. 如何摆脱这个荒谬的错误信息? 从 the HTML 5 specification开始: Co Internet Explorer抱怨评论中的url中有两个破折号:

<!--<iframe src="/file.PHP?var=AQJ--dsf"></iframe>-->

HTML1416: Unexpected character in comment end. Expected “–>”.

如何摆脱这个荒谬的错误信息?

解决方法 从 the HTML 5 specification开始:

Comments must start with the four character sequence U+003C LESS-THAN SIGN,U+0021 EXCLAMATION MARK,U+002D HYPHEN-MINUS,U+002D HYPHEN-MINUS (<!--). Following this sequence,the comment may have text,with the additional restriction that the text must not start with a single “>” (U+003E) character,nor start with a U+002D HYPHEN-MINUS character (-) followed by a “>” (U+003E) character,nor contain two consecutive U+002D HYPHEN-MINUS characters (--),nor end with a U+002D HYPHEN-MINUS character (-). Finally,the comment must be ended by the three character sequence U+002D HYPHEN-MINUS,U+003E GREATER-THAN SIGN (-->).

摆脱错误信息.停止犯错误.在注释中用 – 重写代码的一部分.

总结

以上是内存溢出为你收集整理的html – Internet Explorer – 注释结束警告中的意外字符全部内容,希望文章能够帮你解决html – Internet Explorer – 注释结束警告中的意外字符所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1086766.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存