摘要:
3.5原型 一种继承方式3.6反射3.7枚举 遍历对象的属性时可以用 for in 和 for。 使用for in时 使用hasOwnProperty方法排除原型上的属性,使用typeof排除函数。注意属性出现顺序随即。var name;for (name in another_stooge) { if (typeof another_stooge[name] !== 'function') { document.writeln(name + ': ' + another_stooge[name]); }} 使用for遍历字面量可以避免一些问题。3.8删除 .. 阅读全文
posted @ 2012-07-24 22:16
dearRose
阅读(173)
评论(0)
推荐(0)

浙公网安备 33010602011771号