标签:
function say(msg) { alert(this + ‘ says ‘ + msg); } var tt = { message: ‘James ‘, say: function (thing) { alert(this.message + thing); } } var ss = { message: ‘Alex ‘, say: function (thing) { alert(this.message + ‘ solve ‘ + thing); } } tt.say.call(ss, "Hello World");
// output: Alex Hello World
标签:
原文地址:http://www.cnblogs.com/ayning/p/4313334.html