First, let's talk about the occurrence of this bug.
CopyCodeThe Code is as follows: <a href = "javascript: void (0)" onclick = "document. getelementbyid ('current'). src = 'images/001.jpg ';">
In such a tag, the JS Code in onclick is to change the src attribute of the IMG tag whose ID is current to achieve dynamic switching of images. Unfortunately, ie is the path of the dynamically changed image, but the image is not displayed. You have to right-click "show image" to see the changed image. I do not know why, but it is said that <a href = "javascript: void (0) "> or <a href =" # "> using tag a in this way does not prevent tag a from triggering any behavior at the end. As a result, IE6 mistakenly considers the page to be refreshed or redirected, and all connections are interrupted, so that the loading of the new image will be aborted (I do not know whether it is true or false). No matter the reason is true or false, let's talk about the solution first.
Simple solution:Copy codeThe Code is as follows: <a href = "javascript: void (0)" onclick = "document. getelementbyid ('current '). src = 'images/001.jpg '; return false; ">;
Add return false after the Code;