eWebEditor在IE8下無法使用的解決方法

解決IE8不支持eWebEditor在線文本編輯器的方法如下:

1、首先找到eWebEditor編輯器所在的目錄,然後搜索到editor.js文件,由於eWebEditor有很多個版本,所以editor.js文件所在的目錄也有所不同,有的可能在Include目錄下,有的可能在js目錄下。

2、用記事本打開editor.js文件,找到如下代碼:

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

由於eWebEditor編輯器版本不同,有的可能找不到上面的代碼,而是下面這樣的代碼,兩種代碼只是書寫格式不同而已,含義是一樣的:

if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
    
 
3、將上面的代碼替換爲下面的代碼即可:

if(navigator.appVersion.match(/8./i)=='8.')
    {
      if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)");  
   }
else

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

發佈了36 篇原創文章 · 獲贊 4 · 訪問量 12萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章