ASP vb验证是否为数字

来源:百度知道 编辑:UC知道 时间:2024/05/24 03:16:26
就是验证姓名是否为数字,不是就弹出你填写出错,Name="Age"

急急急 急急急 急急急 急急急 急急急 !!!!!!!
各位大侠帮帮忙!!!!!!!!!!!!!!!!
只有这多分了
搞错了,是电话号码,而且要限制它的长度是7到11位的 是从文本框中录入进来

if not isnumeric(变量) then
response.write "不是数字"
else
response.write "是数字"
end if

用ACSII来判断是否为数字
或者用VAL(名字)<> ""来识别
限制的话用LEN(名字)>7 OR LEN(名字)<11

if isnumeric(姓名) then
name = "Age"
end if

用“isnumeric”这个函数验证文本框中的数据是否为数字串

用正则式验证!