比如说我的全部信息已经写完了,怎么实现按回车就实现了提交功能呢,

解决方案 »

  1.   

    表单的提交属性设置为submit就可以
      

  2.   

    <input type="submit" name="Submit" value="提交" 
      

  3.   

    <script language="JavaScript">
    <!--
    function enterToSave()
        {
           if (window.event.keyCode == 13 )
           { 
              if(confirm("是否保存")){
    alert('保存');
      }else{
    alert('不保存');
      }
           }
        }
    //-->
    </script>
    <body onkeypress="enterToSave()">
    <form method=post action="">
    用户名:<input type="text" name=""><br>
    密码:<input type="text" name=""><br>
    </form>
    </body>
      

  4.   

    同意楼上,用onkeypress获得按键,通过js调用