属性的读写
//属性添加 var obj = {x:1,y:2}; obj.z = 3; obj["m"] = 4;
//属性的读取 var obj = {x: 1, y: 2, z: 3, m: 4}; for(p in obj){ console.info(p); }
时间: 2024-10-10 13:29:27
//属性添加 var obj = {x:1,y:2}; obj.z = 3; obj["m"] = 4;
//属性的读取 var obj = {x: 1, y: 2, z: 3, m: 4}; for(p in obj){ console.info(p); }