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 Resposta
+ 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