function printObject(obj){ var temp = ""; for(var i in obj){//用javascript的for/in循环遍历对象的属性 alert(i); } }