How to Detect User Input with JavaScript

preview_player
Показать описание
In today's video I'll be going over a few techniques to detect changes to input fields or keyboard events with JavaScript. This is perfect for instant form validation or building games on the web.

The 4 events covered are onchange, oninput, onkeydown and onkeyup.

For your reference, check this out:

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript
Рекомендации по теме
Комментарии
Автор

This is such a good video. You explain it so simple. Thank you!!!

spicyydiscord
Автор

I use keyup event to change lowercase to uppercase from user input so the user can notice the animation

mrshahcloud
Автор

How would I go about getting input from the console? Also, congrats on 100k :)

eboatwright_
Автор

Thanks for sharing Dom. You missed the "keypress" event.

neontuts
Автор

Solved my bugs. * * * * *. in under a minute. I had to use event 'input' instead of 'change' to make a button work as expected.

sambacarlson
Автор

mmm "How to write the simplest Keylogger" 😁???

Hacking-NASSA-with-HTML
Автор

"Web Dev Made Easy" on youtube is stealing your tutorials and selling your source code in the description.... get ur bag sir

libanmohamed