-
解决eWebEditor不支持IE8/IE7的问题
资源介绍
eWebEditor不支持IE8/IE7的解决方法(2009-10-29 15:16:52)转载标签: ifie7editorico 分类: 网页技巧
问题文件:WebEditor/editor.js
方法一:
替换editor.js中的 函数BtnMouseUp
function BtnMouseUp() {
if (event.srcElement.tagName != "IMG") {
event.cancelBubble = true;
return false;
}
var image = event.srcElement;
var element = image.parentElement;
//if (element.YUSERONCLICK) (element.YUSERONCLICK + "anonymous()");这句是自带语句!注释掉
if(navigator.appVersion.match(/8./i)=='8.'||navigator.appVersion.match(/7./i)=='7.')
{
if (element.YUSERONCLICK) (element.YUSERONCLICK + "onclick(event)");
}
else
{
if (element.YUSERONCLICK) (element.YUSERONCLICK + "anonymous()");
}
element.className = "BtnMouseOverUp";
image.className = "Ico";
event.cancelBubble = true;
return false;
}
方法二:
把这句if (element.YUSERONCLICK) eval_r(element.YUSERONCLICK + "anonymous()");
替换成:
if(navigator.appVersion.match(/MSIE (7|8)\./i)!=null){
if (element.YUSERONCLICK) eval_r(element.YUSERONCLICK + "onclick(event)");
}else{
if (element.YUSERONCLICK) eval_r(element.YUSERONCLICK + "anonymous()");
}