js实现面向对象
var Animal=function(){ alert("Animal name is "+this.name); }.body({ name:"generic animal", sing:function(){ alert(this.name+" sing"); } }); var Chiken=function(){ Chiken.super.constructor.apply(this); alert("Chiken name is "+this.name); }.body({ name:"chiken", sing:function(sth){ alert(
用户评论