赵丽颖的脚多少厘米:或运算:为了排除一些IP地址,在ASP中我写了下面的代码,可是总是不成功,不知道是什么原因,帮我一把吧!

来源:百度文库 编辑:高考问答 时间:2024/05/09 07:05:38
为了排除一些IP地址,在ASP中我写了下面的代码,可是总是不成功,不知道是什么原因,帮我一把吧!
if trim(request.form("ip"))="192.168.1.1" or "192.168.1.2" or "192.168.1.3" then
response.write "<script language=javascript>"
response.write "alert('该IP不能访问');"
response.write "</script>"
response.write "<script language=javascript>location='javascript:history.back(1)'</script>"
Response.End
end if

ip = trim(request.form("ip"))
if ip = "192.168.1.1" or ip = "192.168.1.2" or ip = "192.168.1.3" then
response.write "<script language=javascript>"
response.write "alert('该IP不能访问');"
response.write "</script>"
response.write "<script language=javascript>location='javascript:history.back(1)'</script>"
Response.End
end if