谁帮我看看我的代码哪里出错.

来源:百度知道 编辑:UC知道 时间:2024/05/17 22:57:37
<%@language=vbscript%>
<!--#include file=conn.asp-->
<html>
<head>
</head>
<body bgcolor=#c1f7d8>
<center>
<%
dim strusername,strage,stralone,strzhiye,strxingge,strhuamian

'读取用户输入数据
strusername=request.form("name")
strage=request.form("age")
stralone=request.form("alone")
strzhiye=request.form("zhiye")
strxingge=request.form("xingge")
strhuamian=request.form("huamian")

'检查输入内容是否有为空的数据
if strusername="" then
response.write "用户不能为空<p></p>"
%>
<a href=javascript:history.back()>上一页</a>
<%
response.end
end if

if strage="" then
response.write "此1项必选<p></p>"
%>
<a href=javascript:history.back()>上一页</a>
<%
response.

if strusername="" then

=是赋值,==才是比较是否相等.

strusername=request.form("name")
要查查那边传过来的有没有name这个文本框
还有是不是用form表单来提交的`??
strusername=trim(request.form("name"))去掉左右空格,
1楼的见解错误,在vbscript中相等是用=的,而在javacript中才是用==的

if strusername="" then
变为
if strusername=="" then