切换到宽版
  • 14266阅读
  • 2回复

asp中如何循环输出26个英文字母 [复制链接]

上一主题 下一主题
离线copy
 

发帖
446
金币
17770
威望
7
贡献值
0
开心币
21
只看楼主 倒序阅读 使用道具 楼主  发表于: 2006-10-02
<%@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>
要好文章找我来
离线copy

发帖
446
金币
17770
威望
7
贡献值
0
开心币
21
只看该作者 沙发  发表于: 2006-10-02

Function   ShowDriveType(drvpath)  
        Dim   fso,   d,   t  
        Set   fso   =   CreateObject("Scripting.FileSystemObject")  
        Set   d   =   fso.GetDrive(drvpath)  
        Select   Case   d.DriveType  
              Case   0:   t   =   "Unknown"  
              Case   1:   t   =   "Removable"  
              Case   2:   t   =   "Fixed"  
              Case   3:   t   =   "Network"  
              Case   4:   t   =   "CD-ROM"  
              Case   5:   t   =   "RAM   Disk"  
        End   Select  
        ShowDriveType   =   "Drive   "   &   d.DriveLetter   &   ":   -   "   &   t  
  End   Function  


Dim   fso,   d,   dc,   s,   t  
        Set   fso   =   CreateObject("Scripting.FileSystemObject")  
        Set   dc   =   fso.Drives  
        For   Each   d   in   dc  
              Select   Case   d.DriveType  
                          Case   0:   t   =   "Unknown"  
                          Case   1:   t   =   "Removable"  
                          Case   2:   t   =   "Fixed"  
                          Case   3:   t   =   "Network"  
                          Case   4:   t   =   "CD-ROM"  
                          Case   5:   t   =   "RAM   Disk"  
                    End   Select  
              s   =   s   &   "Drive:   "   &   d.DriveLetter   &   ":   -"   &   t   &   "<BR>"  
        Next  

要好文章找我来
离线黑水

发帖
1655
金币
26970
威望
81
贡献值
66
开心币
222
只看该作者 板凳  发表于: 2006-10-04
不错 
夫天下事,人间情,俯而就则易,仰而求则难!
快速回复
限100 字节
如果您提交过一次失败了,可以用”恢复数据”来恢复帖子内容
 
上一个 下一个