Home >Web Front-end >JS Tutorial >Detailed explanation of jQuery processing page events_jquery

Detailed explanation of jQuery processing page events_jquery

WBOY
WBOYOriginal
2016-05-16 16:19:121130browse

The introduction of JavaScript to event processing was mentioned in the previous dom operation. Since different browsers handle events differently, this brings unnecessary trouble to developers. jQuery conveniently solves this trouble.

1. Bind event monitoring

(http://www.jb51.net/article/60096.htm) gave a detailed introduction to event monitoring, and saw the difference between iE and DOM standard browsers in treating event monitoring. And the order and method of executing multiple listening events are also different.

In jQuery, binding events through bind() is equivalent to attachEvent() of IE browser and addEventListener() of standard DOM. Example below:

Copy code The code is as follows: