asp注册小问题

来源:百度知道 编辑:UC知道 时间:2024/05/27 21:16:59
我在做ASP页面的时候,我想接收回来的密码长度为6到12位,应该怎么写IF语句。谁可以帮我写一下代码啊。

这个才是密码长度为6到12位
if len(request("password"))>12 then
password=left(request("password"),12)'保证最大长度为12位
elseif len(request("password"))<6 then
response.write("<script language='javascript'>alert('密码长度小于6位!');</script>")
else
password=request("password")
end if

if len(request("password"))<6 or len(request("password"))>12 then
response.write("<script language='javascript'>alert('密码长度不符合要求!');</script>")
response.end()
end if