Disable enter key for textbox input using JavaScript and Jquery.
<script>
$(document).ready(function()
{
// Stop user to press enter in textbox
$("input:text").keypress(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
</script>
<script>
$(document).ready(function()
{
// Stop user to press enter in textbox
$("input:text").keypress(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
return false;
}
});
});
</script>
No comments:
Post a Comment