O.propertyIsEnumerable & setPropertyIsEnumerable
Posted on 2009-12-02 18:01 Bill Yuan 阅读(718) 评论(0) 编辑 收藏 举报代码
var arg:Object = new Object;
arg.a = "aa";
arg.b = "bb";
arg.c = "cc";
trace(arg.propertyIsEnumerable("a")); // true
arg.setPropertyIsEnumerable("a",false);
trace(arg.propertyIsEnumerable("a")); // false;
for(var index:String in arg){
trace(index); // b, c
}
arg.a = "aa";
arg.b = "bb";
arg.c = "cc";
trace(arg.propertyIsEnumerable("a")); // true
arg.setPropertyIsEnumerable("a",false);
trace(arg.propertyIsEnumerable("a")); // false;
for(var index:String in arg){
trace(index); // b, c
}