关于Coolite(EXT)问题之一

当浏览器是IE9时会有这么两个问题经常出现:

一、无法获取属性“UI”的值:对象为null或未定义

  解决方法:在你所编写的页面<head></head>里面插入以下代码:<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE8″ /> 必须在head里的第一行插入,才行的。这样IE9打开该页面就默认用IE8的兼容模式进行渲染,不兼容的问题就解决了。

二、Microsoft JScript 运行时错误: 对象不支持“createContextualFragment”属性或方法
   解决方法:在你所编写的页面添加如下代码即可解决,

<script type="text/javascript">
    if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment) {
        Range.prototype.createContextualFragment = function (html) {
            var frag = document_createDocumentFragment(),
  div = document_createElement_x("div");
            frag.a(div);
            div.outerHTML = html;
            return frag;
        };
    }
</script>

http://coolitetoolkit.51aspx.com/

原文地址:https://www.cnblogs.com/wang726zq/p/Coolite.html