会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
金色約定之家
十里平湖霜满天,寸寸青丝愁华年。对月形单望相护,只羡鸳鸯不羡仙。
asp中如何循环输出26个英文字母
<
%@LANGUAGE
=
"
VBSCRIPT
"
CODEPAGE
=
"
65001
"
%
>
<
!DOCTYPE html
PUBLIC
"
-//W3C//DTD XHTML 1.0 Transitional//EN
"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"
>
<
html xmlns
=
"
http://www.w3.org/1999/xhtml
"
>
<
head
>
<
meta http
-
equiv
=
"
Content-Type
"
content
=
"
text/html; charset=utf-8
"
/>
<
title
>
Untitled Document
</
title
>
</
head
>
<
body
>
asp中如何循环输出26个英文字母
<
br
/>
1
.
<
%
Dim
i :
For
i
=
Asc
(
"
a
"
)
To
Asc
(
"
z
"
) : Response.Write
Chr
(i) :
Next
%
>
<
br
/>
2
.
<
%
str
=
"
a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
"
str
=
Split
(str,
"
|
"
)
For
i
=
0
to
Ubound
(str)
Response.Write(str(i)
&
"
<br>
"
)
Next
%
>
<
br
/>
3
.
<
%
'
大写字母
for
i
=
65
to
90
response.Write
chr
(i)
next
'
小写字母
for
i
=
97
to
122
response.Write
chr
(i)
next
%
>
<
br
/>
4
.
<
%
str
=
"
a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z
"
str
=
replace
(str,
"
|
"
,
"
<br>
"
)
Response.Write(str)
%
>
<
br
/>
5
.
<
%
str
=
"
abcdefghijklmnopqrstuvwxyz
"
for
n
=
1
to
26
response.write(
mid
(str,n,
1
))
next
%
>
</
body
>
</
html
>
posted on
2006-07-15 08:37
★金★
阅读(
1155
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
导航
首页
新随笔
联系
订阅
管理
公告