1. 问题: 有些时候函数执行时,其中的this不是我们想要的!
2. 解决: ES5中提供了一组专门替换函数中不想要的this为想要的对象的函数
3. 包括: call/apply/bind
4. 如何临时替换this:
函数.call(替换this的对象, 其它实参值,... )
↓
this
5. 原理: call做三件事:
1). 调用函数
2). 临时替换函数中的this为call()中第一个实参值对象
3). 将call()中第二个实参值及其之后的所有剩余实参值传给正在调用的函数作为函数的实参值。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta