Note that the obtained tags are all expressed in uppercase letters, such as "TD", "TR", "A", etc. So I copy down some of what I’ve read and come back to it when I don’t remember.
event.srcElement literally has the following keywords: event, source It means: the source of the current event. We can call its various attributes such as: document.getElementById(""). People often ask how to use event.srcElement under firefox. This detailed description: Under IE, the event object has the srcElement attribute, but no target attribute; under Firefox, the event object has the target attribute, but no srcElement attribute. But their functions are equivalent, that is: Under firefox event.target = event.srcElement under IE
Solution: use obj (obj = event.srcElement ? event.srcElement : event.target;) to replace event.srcElement under IE or Firefox event.target. The following are some common situations (the test passes under IE. If you want to test event.target under firefox, you can modify and save the code and then open the test with firefox):