Execute function by pressing "return" using jQuery?
Posted
by Axel
on Stack Overflow
See other posts from Stack Overflow
or by Axel
Published on 2010-03-15T20:18:30Z
Indexed on
2010/03/15
20:19 UTC
Read the original article
Hit count: 198
JavaScript
|jQuery
Hi,
i have two text inputs like the following, i don't want to use <form>
, so i want when people press "return" after filling the inputs, a function called "doit()" should be executed.
<script>
function doit(){
alert("you submitted the info");
..........ajax code........
}
</script>
<input type="text" id="email" />
<input type="text" id="skills" />
Thanks
© Stack Overflow or respective owner