2
rated 0 times
[
3]
[
1]
/ answers: 1 / hits: 16832
/ 8 Years ago, fri, may 13, 2016, 12:00:00
http://codepen.io/abdulahhamzic/pen/YqMQwB
How do I make it so that when I press enter on a text input, it calls a function? I tried using this:
<input type="text" onkeypress="clickPress()">
But the problem is I only want to press enter to call that function, not press any key. How do I achieve that?
2022 Update: onkeypress
is deprecated.
You can use onKeyDown
instead
More From » html