首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

IE9下使用coolite或Ext.net的有关问题,报js错

2013-04-02 
IE9下使用coolite或Ext.net的问题,报js错有个页面使用到了Coolite或Ext.net,在加载的时候报“Microsoft JSc

IE9下使用coolite或Ext.net的问题,报js错
有个页面使用到了Coolite或Ext.net,在加载的时候报“Microsoft JScript 运行时错误: 对象不支持“createContextualFragment”属性或方法”。

通过网上搜资料,在页面上加了如下js代码


if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment) {
    Range.prototype.createContextualFragment = function(html) {
    var frag = document.createDocumentFragment(),
        div = document.createElement_x("div");
    frag.appendChild(div);
    div.outerHTML = html;
    return frag;
    };
    }


但在加载的时候就会报“Microsoft JScript 运行时错误: 对象不支持“createElement_x”属性或方法”

请教各位使用过的大神,这个问题怎么解决
[解决办法]
需要在web.config里设置
<httpModules>
      <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>

热点排行