

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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=gb2312" />
<title>asp從a到z循環(huán)輸出26個(gè)英文字母</title>
</head>
<body>
第一種:asc碼方式:<%Dim i : For i=Asc("a") To Asc("z") : Response.Write Chr(i) : Next%><hr>
第二種:
<%
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)
Next
%>
<hr>
第三種:<br />
大寫(xiě)字母:
<%
for i=65 to 90
response.Write chr(i)
next
%><br />
小寫(xiě)字母:
<%
for i=97 to 122
response.Write chr(i)
next
%><br />
<hr>
第四種:
<%
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,"|","_")
Response.Write(str)
%><hr>
第五種:
<%
str="abcdefghijklmnopqrstuvwxyz"
for n=1 to 26
response.write(mid(str,n,1))
next
%>
</body>
</html>
| 呢 稱(chēng): | |
| 表 情: | |
| 內(nèi) 容: |
評(píng)論內(nèi)容:不能超過(guò) 1000 字,需審核,請(qǐng)自覺(jué)遵守互聯(lián)網(wǎng)相關(guān)政策法規(guī)。 |
| 驗(yàn)證碼: | |
您發(fā)布的評(píng)論即表示同意遵守以下條款:
一、不得利用本站危害國(guó)家安全、泄露國(guó)家秘密,不得侵犯國(guó)家、社會(huì)、集體和公民的合法權(quán)益;
二、不得發(fā)布國(guó)家法律、法規(guī)明令禁止的內(nèi)容;互相尊重,對(duì)自己在本站的言論和行為負(fù)責(zé);
三、本站對(duì)您所發(fā)布內(nèi)容擁有處置權(quán)。
蘇公網(wǎng)安備 32070502010230號(hào)