<div class="codetitle"> <span><a style="CURSOR: pointer" data="89846" class="copybut" id="copybut89846" onclick="doCopy('code89846')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code89846"> <br>login_form为表单ID名。这里只是实现回车表单提交 <br><br>$("#login_form").keypress(function(e) { <br><br>if (e.which == 13) { <br>$("#login_form").submit(); <br>} <br>}); <br><br>$(window).keydown(function (e) { <br>if (e.which == 13) { <br>return false; <br>} <br><br>}) <br> </div>