js イベントが常に on で始まるのはなぜですか?

たとえば、クリックイベント:

elem.onclick = function

Promise then メソッドの仕様:

new Promise().then(onFulfilled, onRejected)

これは命名規則です。onは、何かが起こったときに関数を実行することを意味します

おすすめ

転載: blog.csdn.net/qq_43220213/article/details/129739771
おすすめ