当浏览器是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/

相关文章:

  • 2022-12-23
  • 2021-04-26
  • 2021-08-12
  • 2021-11-28
  • 2021-08-20
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2021-12-20
  • 2021-12-15
相关资源
相似解决方案