pk10在线人工计划群

Yellowstone Website Construction

Yellowstone Web Design

Yellowstone Website Production

Yellowstone Network Promotion

Yellowstone Website Company

Huangshijian Station

Boqiang Technology

Your current position >> Home > News > Site Construction Technology >

Website Construction Technology

News pattern

Website production

Three ways to solve eWebEditor support IE6, IE7, IE8

China Internet Marketing Promotion Expert

method one

Today, upgrading from ie to 8.0 turned out that clicking the ewebeditor online editor button could not pop up the edit box, that is, all the buttons were disabled.
After checking the network information, the test is not available. It is best to work out a feasible solution by yourself, and the test is successful.
The specific operations are as follows:
Open editor.js
Find if (element.YUSERONCLICK) eval (element.YUSERONCLICK + "anonymous ()");
Modify it to:
if (element.YUSERONCLICK)
{
try
{
eval (element.YUSERONCLICK + "onclick (event)");
}
catch (e) {
eval (element.YUSERONCLICK + "anonymous ()");
}
}
Save it again, and you're done.
After upgrading to ie8.0, ewebeditor cannot be used normally because the anonymous () function cannot be used in ie8.0, it can only be used in ie8.0
onclick (event), and the others below 8.0 can only use anonymous (), so here we will use the javascript try function to test run the client ie with 8.0 code. If there is an error, try the code below 8.0 for processing.

Method Two

Due to IE upgrade, the buttons of the website background editor (eWebEditor) cannot be used, such as inserting pictures and other functions. Some third-party browsers don't work, because they use the IE kernel, such as mobile games. So how to solve it.

There should be two methods, one is to modify the editor.js file, and the other is to upgrade the ewebeditor version (I have not tried the second method, you can try it out)

The resolution steps are as follows:

1. Find the editor.js file (search for the file and find it immediately)

2.Find the following red code

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

3.Replace the red code above with the blue code below

// Modify ewebeditor1 so that the editor can be used normally in IE8 \ 7 and mobile games

if (navigator.appVersion.match (/ MSIE (7 | 8) \ ./ i)! = null || navigator.appVersion.match (/ MAXTHON / i) == 'MAXTHON')
{
if (element.YUSERONCLICK) eval (element.YUSERONCLICK + "onclick (event)");
} else {
if (element.YUSERONCLICK) eval (element.YUSERONCLICK + "anonymous ()");
}
// End of modifying ewebeditor1

4. Description:

That is, when the button is clicked, the corresponding function is activated. The official version of IE8 restricts anonymous (). Modifying anonymous () to onclick (event) can be used in IE8, but IE7 and earlier versions do not work, so in order to be able to It can be used in IE8 and previous versions, so a judgment statement has been added, and in order to be used in mobile games, a judgment statement has been added. The combination is as follows: if (navigator.appVersion.match ( / MSIE (7 | 8) \ ./ i)! = Null || navigator.appVersion.match (/ MAXTHON / i) == 'MAXTHON')

Method three

All buttons of ewebeditor under ie8 are invalid, the solution is:

It is because ie8 has blocked the anonymous method, so it needs to be changed to the onclick method. Open the editor.js file below the include, and there is such a piece of code:

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

Change that anonymous method to onclick.

The problem is solved, but it will not work under ie7 after being changed to onclick. After all, many people still use ie7.

Finally found the answer:

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

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

With such a piece of code, just make a judgment on the browser version,

contract

QQ Online Customer Service

  • Online consultation
  • Customer service 001
  • Customer service 001
  • After sales service
  • Customer service 001
Huangshijian Station

QQ Online Customer Service

HomeNewsCaseShowServicesAbout UsContact UsCustomer RequirementsSite Map
Tel: 13597671188 QQ: 494602646 Huangshi Website Construction-Bo Qiang Technology Copyright ? 2013-2014 All Rights Reserved E ICP No. 12000085 Bo Qiang Technology All rights reserved may not be published without permission without permission.