你改了也要到第二次才行啊,这个函数返回的还是true,最好不要这样编码

解决方案 »

  1.   

    <script language="JavaScript">
    function asd()
    {
    alert("ok")
    return false
    }
    </script>
    <html>
    <body>
    <form action="gh.html">
    <input type="submit" onClick="return asd();">
    </form>
    </body>
    </html>
      

  2.   

    Sorry 哦,回答的有点急,没看清你的意思,牛头不对马嘴了,呵呵。
      

  3.   

    <form action="gh.html" onsubmit= "asd()">
    <input type="submit">
    因该这样吧
      

  4.   

    <html>
    <script language="JavaScript">
    function asd()
    {
    alert("ok")
    document.getElementById("io").onclick="return false"
    }
    </script>
    <body>
    <form action="gh.html" onsubmit="return asd()">
    <input type="submit">
    </form>
    </body>
    </html>
      

  5.   

    <html>
    <script language="JavaScript">
    function asd()
    {
    return confirm('你确定要提交吗?');
    }
    </script>
    <body>
    <form action="gh.html" onsubmit="return asd()">
    <input type="submit">
    </form>
    </body>
    </html>