摘要:
伪类//构造器调用模式var Mammal = function (name){ this.name = name;};Mammal.prototype.get_name = function(){ return this.name;};Mammal.prototype.says = function (){ return this.saying || '';};var Cat = function(name){ this.name = name; this.saying = 'meow';};Cat.prototype = new Mammal();Cat.p 阅读全文
posted @ 2011-07-20 17:43 ritazhou 阅读(290) 评论(0) 推荐(0) 编辑