this替换

1 function baseObject(){
2     this.shit = function(){ alert('fuck'); }
3 }
4 function abc(){
5     baseObject.call(this);
6 }
7 var o = new abc();
8 console.log(o.shit)
posted @ 2012-05-23 16:44  小猩猩君  阅读(178)  评论(0编辑  收藏  举报