1. 程式人生 > >按下enter自動提交表單

按下enter自動提交表單

<script language="javascript"> 
     document.onkeydown = function(e) {
         e = e || window.event;
         if(e.keyCode == 13) {
             //this.forms["form"].submit();
          $('#form3').click();
             return false;
         }
     }
 </script>