js-イベント機能は、簡単にするために呼び出します

//一般的な言葉遣い

関数fn(イベント){

  console.log(イベント)

}

div.onclick =関数(イベント){

  FN(イベント)

}

 

簡素化した後====== =====

関数fn(イベント){

  console.log(イベント)

}

div.onclick = FN

-------->同じ以下

div.onclick(関数(イベント){

  console.log(イベント)  

})

おすすめ

転載: www.cnblogs.com/PasserByOne/p/12075229.html