标签:
function printObject(obj){
//obj = {"cid":"C0","ctext":"区县"};
var temp = "";
for(var i in obj){//用javascript的for/in循环遍历对象的属性
temp += i+":"+obj[i]+"\n";
}
alert(temp);//结果:cid:C0 \n ctext:区县
}
标签:
原文地址:http://www.cnblogs.com/afei-happy/p/4301423.html