标签:io color ar sp on cti bs window js
window.color="red";
var o={color:"blue"};
function sayColor(){alert(this.color);}
sayColor();
sayColor.call(this,1,2);
sayColor.call(window,1,2);
sayColor.call(o,1,2);
这样扩充的好处是:对象和方法不需要任何耦合
标签:io color ar sp on cti bs window js
原文地址:http://www.cnblogs.com/xjt360/p/4058489.html