解决Ext在ie9报错:不支持extjs对象的“createContextualFragment属性或方法

把下面的代码放入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;

            };

        }

猜你喜欢

转载自blog.csdn.net/loveshunyi/article/details/88813707