<script language="VBScript" type="text/VBScript">
function check()
window.open"text.asp?test=testname&name="&form1.userid.value,"new","width=200,height=20"
end function
</script>
<%
if request("test")="testname" then
testname=trim(request("name"))
if testname ="" then
Response.Write "用户名不能空"
Response.end
else
set test_rs=cn.execute("select userid from userdata where userid='"&testname&"'")
if test_rs.eof then
Response.Write"恭喜,此帐号尚未被注册"
Response.end
else
Response.Write "对不起,此帐号已被注册,请选择其它账号重新注册"
Response.end
end if
end if
end if
%><form name="form1" method="post" action="text.asp">
username=request("username")
sql="select top 1 * from tab where username='" & username & "'"
rs.open sql,conn,1,1
if not rs.eof then
response.write "有人"
end if