对象冒充call

function Box(name,age){
this.name=name;
this.age=age;
this.run=function(){
return this.name+this.age;
}
}

var o=new Object();
Box.call(o,'wang',20);
alert(o.run());

posted @ 2015-09-21 13:57  上善若水blog  阅读(133)  评论(0编辑  收藏  举报