各位大哥帮帮忙

xfljc 2003-06-02 12:31:05
在ASP中有没有哪个函数可以判断我输入的是26个英文字母,谢谢
...全文
28 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
summercat 2003-06-02
  • 打赏
  • 举报
回复
笨方法:
dim a(26)
a(1)=a
....
a(26)=z
...
输入完提交以后:
for i=1 to 26
if request("str")=a(i) then
response.write str
endif
next
zurong 2003-06-02
  • 打赏
  • 举报
回复
用正则表达式,
annyking 2003-06-02
  • 打赏
  • 举报
回复
<%
function isabc(str)
for i=1 to len(str)
tempstr=asc(mid(str,i,1))
if (tempstr>64 and tempstr<91) or (tempstr>96 and tempstr<123) then '有大写和小写之
isabc=true
else
isabc=false
exit for
endif
next
end function

if isabc("abcsldjflaj2j34j") then
response.write "是"
else
response.write "否"
end if
%>
dafu71 2003-06-02
  • 打赏
  • 举报
回复
for i=1 to len(str)
if (asc(mid(str,i,1))>=65 and asc(mid(str,i,1))<=90) or (asc(mid(str,i,1))>=97 and asc(mid(str,i,1))<=122) then
response.write str
endif
next
hubinasm 2003-06-02
  • 打赏
  • 举报
回复
正则表示式
tripofdream 2003-06-02
  • 打赏
  • 举报
回复
使用正则表示式
reg=/^[A-Za-z]*$/

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧