在页面中添加如下Js代码即可
if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment) {
Range.prototype.createContextualFragment = function (html) {
var frag = document.createDocumentFragment(),
div = document.createElement("div");
frag.appendChild(div);
div.outerHTML = html;
return frag;
};
}
原文:http://www.sencha.com/forum/showthread.php?125869-Menu-shadow-probolem-in-IE9&p=579336
修复IE9菜单阴影问题
本文提供了一段JavaScript代码,用于解决Internet Explorer 9 (IE9) 中的菜单阴影显示问题。通过为Range原型添加createContextualFragment方法,使得开发者能够在IE9中正确创建和展示带有阴影效果的菜单。

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



