一、用submit按钮:<form name="" action="" method="post" onsubmit="return yourfunction(this)";>,当脚本yourfunction返回false时不提交表单
二、用一般按钮时,在脚本提交表单:document.formname.submit();//此之后不能执行任意脚本操作