Hi. i want to use my phone's return key in my application in html css and javascript. How could I do this please. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Hi. i want to use my phone's return key in my application in html css and javascript. How could I do this please.

Use the return key in javascript

25th Jan 2021, 12:39 PM
Moussa Ndoye
Moussa Ndoye - avatar
1 Antwort
+ 4
document.querySelector("input").onkeydown=(e)=>{ console.log(e.key); } In input box ,click on enter key and the above will output name for it. You can refer this article for info on other methods available as well as other keyboard event. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent
25th Jan 2021, 12:55 PM
Abhay
Abhay - avatar