标签:对象 san 情况 obj white name window hit 调用
var obj = {name:"孙悟空", sayname:function () { alert(this.name); } var obj2 = {name:"猪八戒"} obj.sayname.apply(obj2)
function fun(a,b) { console.log("a="+a); console.log("b="+b); } var obj = {name:"孙悟空", sayname:function(){ alert(this.name); } } fun.call(obj,2,3); fun.apply(obj,[2,3])
标签:对象 san 情况 obj white name window hit 调用
原文地址:https://www.cnblogs.com/niuyaomin/p/12115576.html