Analysis of 5 commonly used events in browsers

不言
Release: 2018-09-10 16:11:30
Original
3095 people have browsed it

The content of this article is about commonly used event analysis in browsers. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Form events

Keyboard events

Triggered when the value of <input>, <textarea> changes . In addition, if the element with the contenteditable attribute is turned on, the input event will also be triggered whenever the value changes. One characteristic of the input event is that it will be triggered continuously. For example, every time the user presses a button, an input event will be triggered.

Such events include: keydown, keyup,

Mouse events

select events are triggered when text is selected in <input>, <textarea>

change event is triggered when the value of <input>,