87,989
社区成员
发帖
与我相关
我的任务
分享
A.prototype={
qq:this.c,
mm:function( ){
alert(this.d);
}
}
A.prototype={
qq:this.c,//这里的this绑定的是window
mm:function( ){
alert(this.d);
}
}<script language="javascript">
function A( ){
this.c=function( ){
alert(10);
};
this.d=10;
}
A.prototype={
qq:function(){this.c()},
mm:function( ){
alert(this.d);
}
}
var aa=new A( );
aa.mm( ); // 可以
aa.qq(); // 错误
</script>