如何禁止回车键提交 关键代码:<input  name=aa> 例: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>名称</title> </head> <body> <center><font size="4"><b>材料消耗录入</b><font></center> <form method="post"  name="myform" action="cailiao3save.asp">  <table border="1" cellspacing="1" style="border-collapse: collapse" id="AutoNumber1" cellpadding="0" bordercolor="#C0C0C0" width="690"> <tr>       <td width="71" align="center" height="30" bgcolor="#EFEFEF" valign="middle">序号</td>       <td width="71" align="center" height="30" bgcolor="#EFEFEF" valign="middle">名称</td>       <td width="108" align="center" height="30" bgcolor="#EFEFEF" valign="middle">材料节点</td>       <td width="108" align="center" height="30" bgcolor="#EFEFEF" valign="middle">大类编号</td>       <td width="108" align="center" height="30" bgcolor="#EFEFEF" valign="middle">大类别</td>       <td width="61" align="center" height="30" bgcolor="#EFEFEF" valign="middle">规格</td>       <td width="61" align="center" height="30" bgcolor="#EFEFEF" valign="middle">数量</td>       <td width="50" align="center" height="30" bgcolor="#EFEFEF" valign="middle">单价</td>       <td width="40" align="center" height="30" bgcolor="#EFEFEF" valign="middle">组号</td>       <td width="35" align="center" height="30" bgcolor="#EFEFEF" valign="middle">站号</td>       <td width="62" align="center" height="30" bgcolor="#EFEFEF" valign="middle">井号</td>       <td width="58" align="center" height="30" bgcolor="#EFEFEF" valign="middle">用途</td>       <td width="41" align="center" height="24" bgcolor="#EFEFEF" valign="middle">备注</td>       <td width="55" align="center" height="30" bgcolor="#EFEFEF" valign="middle">日期</td> </tr> <%for i=1 to 20%>  <tr> <td width="3" valign="middle" align="center"><%=i%> </td> <td width="10" valign="middle" align="center"> <input type="text" name="mingchen" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="dalei" size="10" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="bianhao" size="10" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="xiaolei" size="10" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="guige" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="num" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="danjia" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="zuhao" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="zhanhao" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="jinghao" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="yongtu" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="bz" size="5" style="border-style: solid; border-width: 0"></td> <td width="10" valign="middle" align="center"> <input type="text" name="rq" value="<%=date%>" size="10" style="border-style: solid; border-width: 0"></td> </tr> <%next%> </table> <input type="text" name="dalei" size="5" style="border-style: solid; border-width: 0">   <input  name=aa>        <input   type=button   value="提交"   onclick="myform.submit()">      </form>   </table> </body> </html>
|