您的位置:首页 > 其它

解决Ext在IE9上报错,createContextualFragment

2014-01-07 17:58 393 查看
//解决IE9对象不支持“createContextualFragment”属性或方法。
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;
};
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: