症状
规范化方法适用不当于TextNode对象上 Internet Explorer 11 中的网页。
解决方案
更新信息
若要解决此问题,请安装最新的 Internet Explorer 累积安全更新。要做到这一点,请转到Microsoft 更新。
有关最新的 Internet Explorer 累积安全更新的技术信息,请参阅下面的 Microsoft 网站︰
http://www.microsoft.com/technet/security/current.aspx注意:此更新最初包含在安全更新 2976627。
有关安全性的详细信息更新 2976627,请单击下面的文章编号,以查看 Microsoft 知识库中相应的文章︰
2976627 MS14-051: Internet Explorer 累积安全更新︰ 2014,8 月 12
详细信息
当打开包含 Internet Explorer 11 下面的 HTML 代码的网页时,显示第二个警报"-d"但不是"a-b-c-d。"
<!DOCTYPE html><html>
<head>
<title>exo test</title>
<script type="text/javascript">
function testnormalize() {
var textnode1 = document.createTextNode("a-b-");
var textnode2 = document.createTextNode("c-d);
var sp = document.createElement("span");
sp.appendChild(textnode1);
sp.appendChild(textnode2);
alert(sp.innerHTML);
sp.normalize();
alert(sp.innerHTML);
}
</script>
</head>
<body>
<button onclick="testnormalize()">testnormalize</button>
</body>
</html>
状态
Microsoft 已经确认这是“适用于”一节中列出的 Microsoft 产品中的问题。
参考资料
请参阅 Microsoft 用于描述软件更新的术语。