比如我要在 要提交的asp页面里加上
if biaoti="" or zhengwen="" then
biaoti=request("txt_biaoti")
zhengwen=request("zhengwen")
response.Write"<script language='javascript'>alert('请填完标题和正文,再点提交');history.back();</script>"
response.End
end if
但我不想在服务器端asp里判断, 想直接在客户端用javaScript判断, 如何实现, 比如我直接在页面上面写
<SCRIPT language=javascript>
function CheckLogin()
{
     if (document.formlogin.txt_biaoti.value.length==0) 
 {
alert("请填完标题和正文,再点提交");
document.formlogin.login_name.focus();
      return false;
     }
</script>----------这样写虽然会弹出个alert 但还是要提交  ,因为下面form用了
<form name="contrForm" action="contrEdit2.asp?action=add" method="post">