js-事件函数调用简化
// 一般写法
function fn(event) {
console.log(event)
}
div.onclick = function (event) {
fn(event)
}
====== 简化后=====
function fn(event) {
console.log(event)
}
div.onclick = fn
--------> 与下面相同
div.onclick(function(event){
console.log(event)
})