Execution relationship between href jump and onclick of html hyperlink A tag
html's A tag's href is used for jumping, but if the onclick event is added, the execution order?
as follows:
[code]
<a href=1.html onclick=return confirm('Does this node be deleted?'); ><img src=shanchu.gif></a>
If onclick returns false, a does not jump;
If onclick returns true, a jumps
Note: add the return keyword in onclick
This is often used to make judgments before jumping! !