Js page Jump, js page Jump

Source: Internet
Author: User

Js page Jump, js page Jump

Page redirection in js is equivalent to redirection in jsp:

Window. location. href = "xxx. jsp ";

However, sometimes window. location. href sometimes becomes invalid. This is another bad ie bug. The following is a solution:

Microsoft released three solutions.

Address: http://support.microsoft.com/kb/190244/en-us

 

First:

Add window. event. returnValue = false after window. location. href;

For example:

<a href="#" onclick="window.location.href='http://www.microsoft.com';
   window.event.returnValue=false;">

Second:

Write window. location. href as JavaScript: window. location. href

For example:

<a href="JavaScript:window.location.href='http://www.microsoft.com';">

Third:

If you do not write href, write onlick directly. Then, use the css style to control the mouse movement and display the hand effect.

For example:

<A onclick = "window. location. href = 'HTTP: // www.microsoft.com '; "onmouseover =" window. status = 'HTTP: // www.microsoft.com '; "onmouseout =" window. status = '';" style = "cursor: pointer; text-decoration: underline; color: blue; font-family: times new roman">
Reference: http://blog.sina.com.cn/s/blog_49ca87fc0100xvvf.html

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.