标签:
1 //对象字面量 { } 2 var dict = { ‘zs‘: ‘张三‘, age: 18, email: ‘jk@itcast.cn‘, gender: ‘男‘, sayHi: function () { 3 4 } }; 5 for (var key in dict) { 6 alert(key + ‘ ‘ + dict[key]); 7 }
JavaScript中对象字面量
原文地址:http://www.cnblogs.com/Forever-IT/p/5198645.html