/**
* 原型方式 对象 主要利用对象的prototype属性
*/
/** object test**/
function fnPrintaa(){
alert("aaaaaaa 3");
}
function A( ){
this.user = null;
}
A.prototype.aa = function(){
alert("a");
var instance = this;
instance.bb();
}
A.prototype.bb = function(){
}
var aaa = new A();
aaa.bb = fnPrintaa;
function A_test(){
aaa.aa();
}
/** object test**/
* 原型方式 对象 主要利用对象的prototype属性
*/
/** object test**/
function fnPrintaa(){
alert("aaaaaaa 3");
}
function A( ){
this.user = null;
}
A.prototype.aa = function(){
alert("a");
var instance = this;
instance.bb();
}
A.prototype.bb = function(){
}
var aaa = new A();
aaa.bb = fnPrintaa;
function A_test(){
aaa.aa();
}
/** object test**/