javascript获得属性

for(i in test){
 alert(i);//i就是test的属性名
 alert(test.i);//test.i就是属性值
}

 

posted @ 2012-11-13 17:25  一千零一夜  阅读(96)  评论(0编辑  收藏  举报