Yesterday, I upgraded my computer browser to ie8. Then I encountered a problem. One of my web buttons using the eWebEditor was invalid, after repeated troubleshooting, I found an X point for the program that writes the eWebEditor editor. Next I will introduce the solution process.
After searching by multiple parties, it is found that a JS file in the editor has a problem. Because IE7 and IE8 do not support anonymous (), you need to replace it with an onclick (event) event, and a Js file in the editor uses anonymous ().
Solution:
Find the Editor. js file in the directory of eWebEditor. The path is webeditshortdeeditor. js open with notepad. Find the following code (line 1 ):
The Code is as follows: |
Copy code |
If (element. YUSERONCLICK) eval (element. YUSERONCLICK + "anonymous ()");
|
Because the onclick (event) event is not supported in IE6, the corresponding event must be determined based on the browser version, so the code can be changed:
The Code is as follows: |
Copy code |
If (navigator. appVersion. match (/8./I) = '8. ') // determines whether the browser is IE8. if yes, run the following code: { If (element. YUSERONCLICK) eval (element. YUSERONCLICK + "onclick (event )"); } Else // if not, run the following code { If (element. YUSERONCLICK) eval (element. YUSERONCLICK + "anonymous ()"); } Or If (navigator. appVersion. match (/MSIE 7. /I) = 'msie 7. '& navigator. appVersion. match (/Trident/I) = 'think') | navigator. appVersion. match (/MSIE 8. /I) = 'msie 8. ') { If (element. YUSERONCLICK) eval (element. YUSERONCLICK + "onclick (event )"); } Else { If (element. YUSERONCLICK) eval (element. YUSERONCLICK + "anonymous ()"); } |