<form action="**.php" method="post">
<input type="text" name="username"/>
<input type="password" name="pwd"/>
<input type="submit" οnclick="if(event.keyCode==13){gosubmit();}">//Enter 的键值是13
</form>
<form action="**.php" method="post">
<input type="text" name="username"/>
<input type="password" name="pwd"/>
<input type="submit" οnclick="if(event.keyCode==13){gosubmit();}">//Enter 的键值是13
</form>
转载于:https://www.cnblogs.com/pengtaotao/p/6508641.html