<A href = "" OnClick = ""> I encountered some problems, and I was confused for more than a month. Now I have come to the following conclusion from my netizens, which makes my problem easy to understand.
- Linked onThe click event is executed first, followed by the action under the href attribute (page Jump, or javasCript pseudo link );
- Assume that both href and on exist in the link.Click. If you want to disable the action under the href attributeClick must get a return value of false;
- If the page has a scroll bar and you wantClick the event to perform the operation. Set its href attribute to javasSKIP: VO (0); instead of #. This prevents unnecessary page beats;
- If a function with a returned value is called in the href attribute of the link, the content on the current page will be replaced by the returned value of this function;
- The shift key is different.
- The problem I encountered today is that the parentnode cannot be accessed in the form of href in ie6.0.
- Try not to use javasProtocol: As the href attribute of A, this will not only trigger unnecessary window. OnBeforeunload event, in IE it will make GIF animation picture stop playing.