ExtJs 3.0 不兼容 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;
            };
        }

 

posted @ 2012-07-27 08:50  划破黑夜  阅读(1090)  评论(0编辑  收藏  举报