function pp(json){
this.x = (json.x!=null) ? json.x : '未知';
this.xx = (json.xx!=null) ? json.xx : this.x/2;
}
function zz(x){
this.x= x;
}
zz.prototype = new pp({});-------------------------------------------然后
var zz= new zz(50); alert(zz.x+'---'+zz.xx);
alert显示的数据是50和0,怎样才能简便的实时更新继承pp的xx的值?我想要的是25
求大神解惑
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...