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

EditorSina编辑器报错解决办法

2012-04-10 
EditorSina编辑器报错Microsoft JScript 运行时错误: 对象不支持“createContextualFragment”属性或方法浏

EditorSina编辑器报错
Microsoft JScript 运行时错误: 对象不支持“createContextualFragment”属性或方法

浏览器IE9以前开发的时候没事,今天突然就不能用了。什么原因呢?

在线等。

[解决办法]
http://blog.csdn.net/kingboy123000/article/details/7226769


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;
};
}
 

热点排行