0
How do you get user input in web?
User input as in: when the a key is pressed do something.
2 Antworten
+ 14
onkeypress = function(e) {
//e.keyCode.....
};
0
Events.
https://www.w3schools.com/js/js_events.asp
https://www.w3schools.com/js/js_htmldom_events.asp
https://www.w3schools.com/js/js_events_examples.asp
If you use a framework for JS, like jQuery or Angular, it's insanely easier to work with. I know I'm going to get yelled at for this, but vanilla JS is just... ewww. :D It's great to know it, but it has been made much better through those other frameworks.