In some webpages, the <a href = "#"> "#" in herf is changed to javascript: void (0), because # contains a location information, the default anchor is # top, that is, the top of the web page. javascript: void (0) only indicates a dead link.
This is why sometimes a long page browsing link is clearly # But the page jumps to the top, while javascript: void (0) is not.
Ajax technology is generally used in this form, and our project only adds a click event to process some verification logic and then jumps... The problem arises. in IE6, the click event fails...
The following explanation is found on the Internet:
Here href = "javascript:; or Javascript: void (0 or null);" itself means to execute an empty event. The response sequence starts from onclick and then enters href. The problem here is that the empty response of href is executed after the onclick link event is executed. So it becomes invalid.
The solution is to add return false to onclick (that is, do not execute the event in href ). As to why other browsers do not support this problem, it can be explained that "the default value behind other browsers is to keep up with return false; while IE6 is to return true; "Note that this conclusion remains to be verified.
Return false. This is not acceptable...
Another solution is to use ###...
Okay, the problem is solved ..
But is that complicated. Why should I use the <A> label and a <span> problem...
Sometimes, you have to think about problems from multiple perspectives .. Occasionally jump out and look at the problem. There are often new ideas ......