Now we are encountering a compatibility problem. Under IE6, onclick switches the background image of the a tag. The style has been changed, but the background image has not changed. You need to move the mouse out and in to change the background image. How can I change this so that the background image can be modified immediately after the click event is triggered. PS: Changing to span can achieve this effect, but other problems will occur, so I still use the a tag.
This is definitely not a compatibility issue, there must be a problem with your code.
Other browsers don’t have this problem
Use js to directly modify the src attribute of img, right? I remember that there is indeed a problem under IE6, you can consider changing the img method
Could you please solve it? I also encountered a similar problem