Home > Article > Web Front-end > About the response level of javascript bubbling events under IE browser and Firefox_javascript skills
Suppose there is such a tag on our page:
Results under firefox
Results of IE 8
As you can see, the results of the two are not the same? Why exactly is this happening?
It turns out that this is caused by the different levels of support for bubbling events in IE and Firefox. (If you don’t know much about bubbling events, you can check the relevant information first)
(1) In IE 6 and subsequent versions, the level supported by bubbling events reaches the document object.
(2) In Firefox (Mozilla 1.0 and later to be precise), support for bubbling events has been extended to the window object.
As a result, the above event response results are different.
Also, there is something interesting, have you noticed it? It is the response sequence of event targets. (The response sequence of bubbling events... seems a bit nonsense) We know that Firefox supports two event models at the same time, namely: capturing events and bubbling events. Here it is obvious that the event processing function acts in the bubbling stage. That is to say, if we use the traditional method of directly assigning values to event handler function attributes, for example: