var obj = {}; obj.name = '张三'; obj.age = 19; for(var k in obj) { console.log(k,":",obj[k]); } 来源:CSDN作者:A_Lonely_Smile链接:https://blog.csdn.net/A_Lonely_Smile/article/details/103730621 标签 js遍历对象 var js lonely