eWebEditor IE7 IE8 所有按钮无效 解决办法

if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");

改为

if(navigator.appVersion.match(/8./i)=='8.' || navigator.appVersion.match(/7./i)=='7.'){
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)"); //IE8 or IE7
} else {
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()"); //IE6
}

错误原因

据说为ie8屏蔽了anonymous方法 所以要改成onclick方法,打开eWebEditorExt\jc_editor\js下面的editor.js文件,有这样的一段代码(大概在172行所在的函数中 =。=

网上的代码不是IE7好了,IE8又不行了,要么就是IE8行了,IE7又坏了。哎~,现在好了,用上面的代码就没问题啦。

哈哈。F5  搞定!

原文地址:https://www.cnblogs.com/dachie/p/1814931.html