SOURCE

console 命令行工具 X clear

                    
>
console
//call(),bind(),apply(),()()立即调用函数
//call(指向,参数)
//apply(指向,[参数])
//bind(指向),并不立即调用,在func()的时候才会调用,复制给
//原函数拷贝,let x = func.bind(obj) ,x()如果是类则不属于直接调用
var btn = document.getElementById("aa");
console.log(btn)
btn.onclick = function () {
    console.log("aaa")
    this.disabled = true;
    setTimeout(function () {
        this.disabled = false
    }.bind(this), 3000);
}


<html>

<body>
	<button class = 'aa' id='aa'>点击</button>
</body>
</html>