上面的代码中,写了onSubmit="A()"就永远不可能提交表单了,怎么会刷新?

解决方案 »

  1.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    <form name="form1" method="post" onsubmit="return A();">
    <p>
      <input type="text" name="textfield" id="textfield">
    </p>
    <p>
      <input type="text" name="textfield2" id="textfield2">
    </p>
    <p>
      <input type="text" name="textfield3" id="textfield3">
    </p>
    <p>
      <input type="submit" name="Submit" value="提交" onClick="A()">
    </p>
    </form>
    <p>&nbsp;</p>
    </body>
    </html>
    <script language="javascript">
    function A()
    {
    document.form1.textfield3.focus();
    return false;
    }
    </script>