Last active
January 2, 2016 13:29
-
-
Save wangwen1220/8310701 to your computer and use it in GitHub Desktop.
JS: jQuery 禁用表单的回车键提交 | Disabled return submit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // jQuery 禁用表单的回车键提交 | |
| $("#form").keypress(function(e) { | |
| if (e.which == 13) { | |
| return false; | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment