Ewebeditor edit cannot eject the Upload dialog box

Source: Internet
Author: User
Tags anonymous eval

This provides a third method, modify the code of the editor I, can directly solve in the IE7 8 browser normal use. The specific methods are as follows:

Open the Editor.js file under Include, which has this code:

The code is as follows Copy Code

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

Said because IE8 shielded the anonymous method, so to change to click Method, so changed to this, but I have an amazing discovery, it is changed to do so after the IE7 editor is no use, pain and I went online to check, the Internet is really high water like clouds, Sure enough, I found the answer on the CSDN:

The code is as follows Copy Code

if (Navigator.appVersion.match (/8./i) = = ' 8. ')
{
if (element. Yuseronclick) eval (element. Yuseronclick + "onclick (event)");
}
Else

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

Or

The code is as follows Copy Code

if (Navigator.appVersion.match/msie (7|8| 9)./i)!=null {
if (element. Yuseronclick) eval (element. Yuseronclick + "onclick (event)");
}else{
if (element. Yuseronclick) eval (element. Yuseronclick + "anonymous ()");
}

Changing the code so that it works under IE7 and IE8.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.