日期:2014-05-16 浏览次数:20532 次
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;  
      };  
  }