摘要:
call() 方法call() 方法是与经典的对象冒充方法最相似的方法。它的第一个参数用作 this 的对象。其他参数都直接传递给函数自身。例如function sayColor(sPrefix,sSuffix) { alert(sPrefix + this.color + sSuffix);};var obj = new Object();obj.color = "blue";sayColor.call(obj, "The color is ", "a very nice color indeed.");语法:call([thisO 阅读全文
posted @ 2013-02-27 13:07
锋芒毕露
阅读(312)
评论(0)
推荐(0)
2013年2月27日