读书人

EditorSina编辑器报错解决办法

发布时间: 2012-04-10 21:03:56 作者: rapoo

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


读书人网 >asp.net

热点推荐