Windows. Location. href stops working under IE6

Source: Internet
Author: User
[Problem description]

Windows. Location. href stops working under IE6

[Solution] 1. <a href => label view code

1 <SCRIPT type = "text/JavaScript"> function gourl (x) {window. location. href = x ;}</SCRIPT> <a href = "javascript:;" onclick = "javascript: gourl ('HTTP: // www.sina.com '); "> jump 1 </a> <a href =" javascript: void (0); "onclick =" javascript: gourl ('HTTP: // www.sina.com '); "> jump 2 </a> <a href =" javascript: void (0); "onclick =" javascript: gourl ('HTTP: // www.sina.com '); Return false; "> jump 3 </a> <a href =" # "onclick =" javascript: gourl ('HTTP: // www.sina.com '); "> jump to 4 </a> <a href =" ### "onclick =" javascript: gourl ('HTTP: // www.sina.com '); "> jump 5 </a>

Test Environment IE6, IE7, and Firefox 3.
Redirection 1 and 2 are invalid in IE6 environment, and can be tested in IE6, IE7, and firefox3.01 in 3, 4, and 5.
Yes ,.
Jump to 4 and 5 is the most concise.
The key lies in the href attribute of <A>. For empty links, use "#","###".
In order not to return to the top of the page.
"####" Is recommended for empty links "###".

2. Direct window. Location. href = "1.html" view code

1. test environment IE6, IE7, and Firefox 3. 2 jump 1 and 2 are invalid in IE6 environment, and 3, 4, and 5 can pass the test in IE6, IE7, and firefox3.01 ,. 3 jump 4 and 5 are the most concise. 4. The key lies in the href attribute of <A>. For empty links, use "#","###". 5. In order not to return to the top of the page. 6. "###" is recommended for empty links "###". 7 8 2. Direct window. Location. href = "1.html"

 

 

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.