当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Keys 方法

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP Keys 方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 330 ::
收藏到网摘: n/a

The Keys method returns an array of all the keys in a Dictionary object.
ASP Keys的作用是以数组的形式返回一个字典中所有的关键词。

Syntax
语法

DictionaryObject.Keys

Example
举例

<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "n","Norway"
d.Add "i","Italy"
d.Add "s","Sweden"
Response.Write("<p>Key values:</p>")
a=d.Keys
for i=0 to d.Count-1 Response.Write(a(i)) Response.Write("<br />")
next
set d=nothing
%>

Output:

Key values:
n
i
s

评论 (0) All

登陆 | 还没注册?