摘要: 原文:http://bonsaiden.github.com/JavaScript-Garden/zh/function Foo() { this.value = 42;}Foo.prototype = { method: function() {}};function Bar() {}// 设置Bar的prototype属性为Foo的实例对象Bar.prototype = new Foo();Bar.prototype.foo = 'Hello World';// 修正Bar.prototype.constructor为Bar本身Bar.prototype.construct 阅读全文
posted @ 2012-10-19 11:06 @电动小马达 阅读(237) 评论(0) 推荐(0)