<form method=post action="" onSubmit="jnkc.disabled=true">
<input type="submit" id="jnkc">
</form>

解决方案 »

  1.   

    to jnkc(江南昆虫) :
      如果我还想在提交表单的时候加入javascript判断语句,这时候怎么把这两种功能都包括进来呢?(即:判断和防止重发)
      

  2.   

    楼主怎么自己不变通一下呢?<html>
    <head>
    <title></title>
    <meta name="Generator" content="EditPlus">
    <meta name="Author" content="JnKc">
    <meta name="Keywords" content="">
    </head>
    <body>
    <form method=post action="">
    <input type="text" name="uname">
    <button onClick="chk()" name="jnkc">提交</button>
    </form>
    <script language="JavaScript">
    <!--
    function chk(){
    with (document.forms[0]){
    jnkc.disabled=true;
    if (uname.value==''){
    alert('必填');
    jnkc.disabled=false;
    return;
    } else{
    submit();
    }
    }
    }
    //-->
    </script>
    </body>
    </html>