If I have html element like this
<input type = "text" onkeypress="if(this.keyCode == 13){alert()}" />
Not work, Please advice
You can try like this
<input type = "text" onkeypress="javascript: if(event.keyCode == 13) alert();" />
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With