1.IE自动消除空白符
[b]IE8:[/b] |<P><B>hello </B>js </P>|
[b]Chrome:[/b] | <p> <b> hello </b>js </p> |
2.在IE中以下元素的innerHTML是只读的:
col、 colgroup、frameset、html、 head、style、table、tbody、 tfoot、 thead、title 与 tr
var div = document.createElement("div");
div.innerHTML = " <p> <b> hello </b>js </p> ";
console.log("|" + div.innerHTML + "|")
[b]IE8:[/b] |<P><B>hello </B>js </P>|
[b]Chrome:[/b] | <p> <b> hello </b>js </p> |
2.在IE中以下元素的innerHTML是只读的:
col、 colgroup、frameset、html、 head、style、table、tbody、 tfoot、 thead、title 与 tr
本文详细对比了IE8和Chrome浏览器在处理HTML元素innerHTML时的差异,特别是针对只读元素的表现,并提供了实例代码进行演示。
5378

被折叠的 条评论
为什么被折叠?



