Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback

HTML5 standardizes the oninput event handler, which should be used to detect user input in JavaScript. Sure, you could use onkeydown or onkeyup instead, but those were never really designed for this particular use case, and it shows.


This content originally appeared on Mathias Bynens and was authored by Mathias

HTML5 standardizes the oninput event handler, which should be used to detect user input in JavaScript. Sure, you could use onkeydown or onkeyup instead, but those were never really designed for this particular use case, and it shows.


This content originally appeared on Mathias Bynens and was authored by Mathias


Print Share Comment Cite Upload Translate Updates
APA

Mathias | Sciencx (2011-05-11T09:31:52+00:00) Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback. Retrieved from https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/

MLA
" » Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback." Mathias | Sciencx - Wednesday May 11, 2011, https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/
HARVARD
Mathias | Sciencx Wednesday May 11, 2011 » Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback., viewed ,<https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/>
VANCOUVER
Mathias | Sciencx - » Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/
CHICAGO
" » Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback." Mathias | Sciencx - Accessed . https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/
IEEE
" » Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback." Mathias | Sciencx [Online]. Available: https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/. [Accessed: ]
rf:citation
» Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback | Mathias | Sciencx | https://www.scien.cx/2011/05/11/using-the-oninput-event-handler-with-onkeyup-onkeydown-as-its-fallback/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.