However, most domestic users are still using IE6.
When switching an image through the onclick event of the a tag under IE6, there may be a problem that the image cannot be loaded. The performance result of httpwatch crawling is abort.
Tested it and found a solution.
A tag event is generally written like this, or it may be a binding event. The solution is the same:
1. a1
2. a2
3. a3
The third method dosomething() has no problem switching pictures, but href="###" does It brings another problem, it occupies the anchor point and the page URL is not beautiful.
Although the first and second methods do not have the above problems, they will cause strange bugs in IE6. The images in dosomething() cannot be loaded.
Just add a return false; after dosomething(); to solve the problem.
If it is a binding event, also add return false; at the end of the function.