The submit method does not invoke the onsubmit event handler.

解决方案 »

  1.   

    <br><script language=JavaScript>
    function validate(theform) {
    if (theform.chaptertitle.value=="" || theform.chaptercontent.value=="  ") {
    alert("请输出标题和内容");
    return false; 
    }
       return true;
    }</script>
    <form name="theform" method="post">
    <input type=text size=80 maxlength=80 name="chaptertitle" value="">
    <input type=name name="abc">
    <textarea name=chaptercontent></textarea> 
    <input type="button" value=" 发 表 " onclick="javascript:this.value='提交中,请稍候';this.disabled=true;validate(theform);">
    </form>