Step towards Dot Net
Blog to share my experience which can be helpful to the new .NET folks.
Pages
Home
About Me
Privacy Policy
Contact for Ads
Thursday, January 30, 2014
How to avoid or lock enter key in form?
Use this simple code to avoid enter key on form-
<script type="text/javascript">
$(document).keypress(
function (event) {
if (event.which == '13') {
event.preventDefault();
}
}
);
</script>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment