call方法
var obj1 = (function (){
var i = 1;
test = function(txt){alert(txt)};
return function() {
i ++ ;
alert(i);
}
})();
function func2(){
test.call(this,'hello janey');
}
func2();
var i = 1;
test = function(txt){alert(txt)};
return function() {
i ++ ;
alert(i);
}
})();
function func2(){
test.call(this,'hello janey');
}
func2();