javascript获得属性

for(i in test){
 alert(i);//i就是test的属性名
 alert(test.i);//test.i就是属性值
}
原文地址:https://www.cnblogs.com/daixingqing/p/2768376.html