function Parent(){
this.name = "李小龙"; this.age = "30"; };Parent.prototype.lev=function(){ return this.name;}var x=Parent();alert(x.name);alert(x.lev());本文共 217 字,大约阅读时间需要 1 分钟。
function Parent(){
this.name = "李小龙"; this.age = "30"; };Parent.prototype.lev=function(){ return this.name;}var x=Parent();alert(x.name);alert(x.lev());转载于:https://www.cnblogs.com/yuyedaocao/p/9736317.html