This bug left me around for nearly half an hour, and finally Google was successful because of the underlying bug in IE6. When we changed the href attribute of <A>, loading was interrupted, so we could not see the image, this is often encountered when the verification code or dynamic image change.
Therefore, when using a link, href and onclick are usually used at the same time. The onclick event of the link is executed first, followed by the action under the href attribute (page Jump, or Javascript pseudo link ), assume that href and onclick exist simultaneously in the link. If you want to disable the action under the href attribute, onclick must get a return value of false.
Therefore, the solution is to give onclick a false value to ignore the href attribute.
For example:
<A href = "javascript:;" onclick = "change image (); Return false;"> click to change image </a>
-----------------------------------------------
The above is extracted from the network, but even so, the problem still persists. In the end, there is no way to change a to span.
<Span onclick = "change image ();" style = "cursor: Hand"> </span>