本文章简介一下asp 运算符(算术运 比较运 逻辑运算符)与运算符的优先级简单代码。
1.算术运算符
实例:
example10.asp
2.比较运算符
3.逻辑运算符
实例:
example12.asp
4.运算符的优先级
<%
if request.form("submit") = "提交" then '用户点击【提交】按钮
if instr(request.form("str"),"@")<=0 then 'instr函数判断用户输入的字符串中是否包含@字符,如果包含,返回的值是@字符在字符串中第一次出现的位置
response.write("") '不包含,给出提示
else '包含,给出提示
response.write("")
end if
end if
%>
实例二