源代码如下:
<!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中输出26个英文字母的几种方法汇总-成功志(www.ok12.net)</title>
</head>
<body>
<br />
方法1:
<br />
<%
Dim i : For i=Asc("a") To Asc("z") : Response.Write Chr(i) : Next
%>
<br /><br />
方法2:
<br />
<%
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 /><br />
方法3:
<br />
<%
Response.Write("大写字母:<br>")
for i=65 to 90
response.Write chr(i)
next
Response.Write("<br />小写字母:<br>")
for i=97 to 122
response.Write chr(i)
next
%>
<br /><br />
方法4:
<br />
<%
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 /><br />
方法5:
<br />
<%
str="abcdefghijklmnopqrstuvwxyz"
for n=1 to 26
response.write(mid(str,n,1))
next
%>
</body>
</html>