在win7下ewebeditor编辑器不能用的解决办法
核心提示:新装了win7,发现网站后台的ewebeditor编辑器无效了,我用的是ewebeditor ASP 2.8免费版本。
新装了win7,发现网站后台的ewebeditor编辑器无效了,我用的是ewebeditor ASP 2.8免费版本。
网上搜索了一下,经测试以下的修改是最好的。
找到编辑器目录下include/下的 editor.js 或editor.asp 在其中搜索关键字 element.YUSERONCLICK
找到:
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
这一行。
然后把整个语句 修改成下面代码:
if(navigator.appVersion.match(/MSIE (7|8)\./i)!=null){ if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)"); }else{ if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()"); }
上面的语句就是检测IE的版本,来不同处理!
这个问题的本质是 是因为ie8屏蔽了anonymous方法所以要改成onclick方法。

