Showing
1 changed file
with
9 additions
and
1 deletions
@@ -429,6 +429,15 @@ exports.init = function(page) { | @@ -429,6 +429,15 @@ exports.init = function(page) { | ||
429 | } | 429 | } |
430 | }); | 430 | }); |
431 | 431 | ||
432 | + // 按回车键提交 | ||
433 | + $registerPage.on('keydown', function(e) { | ||
434 | + var key = e.which; | ||
435 | + | ||
436 | + if (key === 13) { | ||
437 | + $registerBtn.click(); | ||
438 | + } | ||
439 | + }); | ||
440 | + | ||
432 | $registerPage.find('.va').keyup(function() { | 441 | $registerPage.find('.va').keyup(function() { |
433 | 442 | ||
434 | var j, | 443 | var j, |
@@ -533,7 +542,6 @@ exports.init = function(page) { | @@ -533,7 +542,6 @@ exports.init = function(page) { | ||
533 | 542 | ||
534 | //ajax表单提交 | 543 | //ajax表单提交 |
535 | $registerBtn.click(function() { | 544 | $registerBtn.click(function() { |
536 | - | ||
537 | var url; | 545 | var url; |
538 | 546 | ||
539 | if (page === 'reg') { | 547 | if (page === 'reg') { |
-
Please register or login to post a comment