请问ASP如何只能输入指定数据

2025-12-17 15:28:37
推荐回答(2个)
回答1:

dim getstr'接收输入值
dim a
a=0
dim str="第一中学,**中学,……,NN中学"
getstr = request("ss")
arrstr=split(str,",")
for i=0 to ubound(arrstr)
if getstr=arrstr(i) then exit for
a=a+1
next
if a>=ubound(arrstr) then
response.write("输入的内容不在指定范围")
end if

回答2:

限止输入字符