I've got a single line of code (no forms involved) here:
<input name="txtQty" type="number" id="txtQty" class="form-control" autocomplete="off" pattern="\d*">
Tried the below code to get the keycode to know that enter key pressed:
$("#txtQty").on('keyup', function (e) {
if (e.key === 'Enter' || e.keyCode === 13) {
alert("enter");
}
});
When clicking on the Next button it's a move to the next input element instead of fire keyup event:
Is there any way to press the next button on the keyboard and get that to execute my other javascript function?