function Parent(){ this.name = "李小龙"; this.age = "30"; };Parent.prototype.lev=function(){ return this.name;}var x=Parent();alert(x.name);alert(x.lev());
构造函数+原型的js混合模式
原文:https://www.cnblogs.com/yuyedaocao/p/9736317.html