ASP 表单提交问题 怎么让表单 有的不填写也可以通过

来源:百度知道 编辑:UC知道 时间:2024/04/29 23:54:16
<%dim msg
If Request.QueryString("action")="add" Then
If Request.Form("Name")="" Then
response.write "<script>alert(""您的“申请方名称”不可以不填写!"");window.history.back();</script>"
Founderr=True
Else
Name=Request.Form("Name")
End If

If Request.Form("dizhi")="" Then
response.write "<script>alert(""您的“申请人地址”不可以不填写!"");window.history.back();</script>"
Founderr=True
Else
dizhi=Request.Form("dizhi")
End If

If Request.Form("lianxi")="" Then
response.write "<script>alert(""您的“申请方联系人”不可以不填写!"");window.history.back();</script>"
Founderr=True
Else
lianxi=Request.Form("lianxi")
End If

If Request.Form("Name")="" Then

如果NAME表单传过来的是空,那就触发response.write "<script>alert(""您的“申请方名称”不可以不填写!"");window.history.back();</script>"

不做这个判断就就行了

想不添哪个可以通过把那项验证去掉...