相关疑难解决方法(0)

浏览器是否广泛支持属性中的数字引号?

除了这个(通常的)之外,还有其他链接到JS的方法.

<script src="myscript.js" type="text/javascript"></script>
Run Code Online (Sandbox Code Playgroud)

...利用其他报价类型:

<script src=&#34;myscript.js&#34; type=&#34;text/javascript&#34;></script>
Run Code Online (Sandbox Code Playgroud)

在现代浏览器和使用中的旧浏览器(如IE6)中是否广泛支持这些?使用这种方法基本上是安全的,就像使用常规双引号方法一样?


编辑:HTML4规范似乎允许它,但它很好地变为现实支持?

3.2.2 Attributes

  Authors may also use numeric character references to represent
  double quotes (&#34;) and single quotes (&#39;).

  For double quotes authors can also use the
  character entity reference &quot;.
Run Code Online (Sandbox Code Playgroud)

html javascript tags

0
推荐指数
1
解决办法
250
查看次数

标签 统计

html ×1

javascript ×1

tags ×1