Keys 方法
时间:2007-12-27 来源:不详 作者:林子
返回一个数组,其中包含了一个 Dictionary 对象中的全部现有的主键。 织梦好,好织梦
object.Keys( )
织梦内容管理系统
其中 object 总是一个 Dictionary 对象的名称。 本文来自织梦
说明
下面这段代码说明了 Keys 方法的用法: dedecms.com
function KeysDemo() {
var a, d, i, s;//
创建一些变量。d = new ActiveXObject("Scripting.Dictionary");
d.Add ("a", "Athens");//
添加一些主键和条目。d.Add ("b", "Belgrade");
d.Add ("c", "Cairo");
a = (new VBArray(d.Keys())).toArray();//
获得主键。s = "";
for (i in a)//
遍历dictionary
。 {s = a[i] " - " d(a[i]) "<br>";
}
return(s);//
返回结果。 } 本文来自织梦
请参阅
Add 方法 (Dictionary) | Exists 方法 | Items 方法 | Remove 方法 | RemoveAll 方法应用于: Dictionary 对象
内容来自dedecms

上一篇:MoveFile 方法 下一篇:GetTempName 方法
文章评论
共有位Admini5网友发表了评论 查看完整内容