0
Giving function to enter button which is in keyboard
I have a textbox. While I am writing , if I click to enter, It runs a function How can I make that ?
5 odpowiedzi
+ 8
Here's my demo.
Check it out please.
It supports PC and Mobile, Tablet.
[Pure JS]
https://code.sololearn.com/W1MIaDzPb75n/?ref=app
[JQuery]
https://code.sololearn.com/WKjNU0hPKAez/?ref=app
+ 1
document.onkeydown = function(e) {
if(e.keyCode == 13){
myFunction();
}
};
}
0
I guess it is working on computer but I want to make that on my mobile phone Do you know that's mobile
version ? Thank you 😊
0
I found 😂😂
<input type="search">
and Event is
document.getElementsByTagName("input")[0].onsearch=function(){
//
}
0
could you look my new question