Asp classic vbscript中的or运算符

Asp classic vbscript中的or运算符,asp-classic,vbscript,Asp Classic,Vbscript,vbscript是否支持or运算符 我想在vbscript中执行以下代码,请帮助我 if a="address1" or b = "address2" then Response.Redirect("www.example.com") endif 你真的很接近: If a = "address1" Or b = "address2" Then Response.Redirect("www.example.com") End If 为了可读性使用括号 If (a = "ad

vbscript是否支持or运算符

我想在vbscript中执行以下代码,请帮助我

if a="address1" or b = "address2"
    then Response.Redirect("www.example.com")
endif
你真的很接近:

If a = "address1" Or b = "address2" Then 
    Response.Redirect("www.example.com") 
End If

为了可读性使用括号

If (a = "address1") Or (b = "address2") Then 
    Response.Redirect("www.example.com") 
End If

VBScript是换行敏感的。您必须将“then”与“if”保持在同一行上。此外,end和if之间的空格为:end if not endif