Solution for invalid iis c # EPT: void (0) in IE6

Source: Internet
Author: User

Solution for invalid iis c # EPT: void (0) in IE6

This article mainly introduces the solution to the invalid issue of javasc # EPT: void (0) in IE6. If you need a friend, you can refer to it and hope to help you.

In IE 6, JSP links:

 

<A href = "javascript: void (0);" target = "mainFrame" onClick = "btnHome_onClick ()">

 

<Javascript>

 

Function btnHome_onClick (){

Window. open ("com. mcl. common. main. InitHome. flow", "mainFrame ");

If (winoperate. style. display! = "None "){

Silde_onClick ();

Sildebar. style. display = 'none ';

Winoperate. style. display = 'none ';

}

}

 

</Javascript>

 

The above Code does not respond in IE6.

 

The reason is: void (0) is a computation expression, and the result of returning 0 does not respond to the page;

 

The default event of a is also triggered after The onClick event: void (0)

 

Solution: Add return false;

 

<A href = "javascript: void (0);" target = "mainFrame" onClick = "btnHome_onClick (); return false;"> Home </a>

 

 

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.