Home  >  Article  >  Web Front-end  >  js textInput text event in DOM3_javascript skills

js textInput text event in DOM3_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:08:141065browse

Unlike keypress, this event is only triggered when the user enters visual characters, while the keypres event is triggered as long as a key is pressed (such as CapsLock, Backspace).
You can see that textInput mainly considers characters, and the input characters can be obtained through the data attribute of the event object.
Example


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute
]
Currently only IE9, Chrome, Safari supports.
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