Home >Web Front-end >JS Tutorial >js propertychange and oninput events_javascript skills

js propertychange and oninput events_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:35:051540browse

Fortunately, there are propertychange (IE) and oninput events.

Oninput is a standard browser event, generally applied to input elements. It occurs when the value of the input changes. Whether it is keyboard input or mouse pasting changes, it can be monitored immediately.

Browser compatible

IE9 and below are not supported. At this time, IE's proprietary propertychange event will be used. As the name suggests, it is translated as an attribute change event. This event is relatively powerful. It will not only monitor the value attribute of the input, but also include the attributes of other tags. This event will occur when various attributes change, such as the style attribute of the span element. You can also use event.propertyName to access the changed property name when the event occurs.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn