Ext在IE9上报错:对象不支持“createContextualFragment”属性或方法

来源:互联网 发布:中华商务网数据录入 编辑:程序博客网 时间:2024/06/10 09:47
在页面中增加下面脚本

<script type="text/javascript">
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;
    };
}
</script>

源自 

http://forums.ext.net/showthread.php?12837-FIXED-createContextualFragment-error-in-IE9


原创粉丝点击