+ 2

How do is target users input while typing using js

13th Nov 2021, 4:04 PM
Dagota
Dagota - avatar
2 Réponses
+ 2
Dagota Your question isn't very clear to me, but you could use the accesskey attribute in html to focus an element or either the accessKey property or the focus method in js. I hope that answers your question, else don't mind asking more precisely. https://www.w3schools.com/tags/att_global_accesskey.asp
13th Nov 2021, 6:47 PM
Maisu
Maisu - avatar
+ 1
Not sure are you asking for this, question is unclear. But you can get inputs value while user is typing, each character. If you use onkeyup as event listener and select this input field value inside js This will place text inside paragraph while user is typing <input id="i" type="text" onkeyup="func()"/> <p id="p"></p> function func() { document.getElementById("p").innerText = document.getElementById("i").value }
13th Nov 2021, 10:19 PM
PanicS
PanicS - avatar