ITeye博客

解决ie9 不支持extjs3.3对象的 “createContextualFragment”属性或方法

duobility · 2012-02-07 10:10 · Javascript · Web前端 · Markdown

在页面中添加如下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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。