Solution to IE6 "unable to open site, operation terminated" prompt

Source: Internet
Author: User

Today, I encountered a problem. When the website is opened under IE 6, the following message is displayed: Internet Explorer cannot open website XXX. The operation has been terminated.

First, we will introduce common solutions on the Internet.

When the page does not have ready, the appendChild or innerHTML operation of htmlObject is called. In this case, a dialog box is displayed on IE: "Internet Explorer cannot open website XXX, and operation terminated ".

The solution is as follows:

1. Determine document. readyState = "complete" in the appendChild or innerHTML operations. If this is not the case, perform this operation several seconds after setTimeout. However, this attribute is only valid for ie and opeara. The document of ff does not have the readyState attribute and is always undefined.

2. Use the defer attribute in the script. It is intended to execute the script after the page is loaded, so that the object cannot be found. Defer does not consider whether all external files have been downloaded, but determines whether the current page has been fully loaded. In addition, the document. write method cannot be written in the code block with the defer label.

The second method is not effective when loading external files, which may cause other unexpected problems.

So the first method is adopted, and the recursive method is used:

Function mytest () {if (document. readyState = "complete") // execute the else setTimeout ("mytest ()", 1000 )}

In fact, the problem I encountered is very simple, not caused by the above problem.

See the following code:

<! ---- <Div class = "kb"> <table> <tr> <td> News: </td> <div id = "div4" class = "kb_core"> <a> <script type = "text/javascript" src = "http://bbs.ituwww.com/api.php? Mod = js & bid = 69 "> </script> </a> </div> </td> </tr> </table> </div> -->

Because the <script> label is also commented out in the comment, this is not a problem in other browsers, but the lack of IE6 leads to unacceptable errors.

Here we will record it and hope to help you who need it.

Related Article

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.