我有一个接受回调函数的函数。如何设置回调函数的“this”变量?
例如。
function(fn){
//do some stuff
fn(); //call fn, but the 'this' var is set to window
//, how do I set it to something else
}
最佳答案
关于Javascript - 我如何为函数设置 'this' 变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3238951/