New course! Every coder should learn Generative AI!
Try a free lesson+ 1
try this out I used this in my own script.
function _execute(e){
if (e.keyCode == 13) {
//Execute the code here
return false;
}
}
<input onkeypress="return _execute(event);" type="text"/>