xhr.onreadystatechange = function() { if(xhr.readyState === 4) {
var cb if(xhr.status === 200) { cb = opts.success;
} else { cb = opts.fail;
}
cb && cb.call(null, xhr.responseText);
}
}在這段代碼中call是種什么用法,調用的那個函數?
js中關于call方法的疑問
慕森卡
2018-09-07 10:34:22