www.baike369.com
百科369 > ASP教程 > ASP Dictionary对象Count属性

ASP Dictionary对象Count属性


ASP Dictionary对象Count属性

ASP的Count属性用于返回在Dictionary对象中的key/item对的数目。


语法

DictionaryObject.Count

示例

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<title>ASP Dictionary对象Count属性示例-www.baike369.com</title>
</head>
<body>
<%
'ASP Dictionary对象Count属性示例-www.baike369.com
dim a
set a=Server.CreateObject("Scripting.Dictionary")
a.Add "c","China"
a.Add "r","Russia"
a.Add "i","Italy"
a.Add "s","Sweden"
Response.Write("key/item对的数目为:" & a.Count)
set d=nothing
%>
</body>
</html>

在浏览器中查看ASP Dictionary对象Count属性的显示效果。如下图所示:

在浏览器中查看ASP Dictionary对象Count属性的显示效果

Copyright© 2011-2016 www.baike369.com All Rights Reserved