- $(document).ready(function () {
- $(this).keypress(function (e) {
- switch (e.which) {
- case 13:
- alert("您按下了回车键");
- break;
- //more detect
- }
- });
- });
- //该片段来自于http://www.codesnippet.cn/detail/070520133182.html
来源: http://www.codesnippet.cn/detail/070520133182.html