更新时间:2023-12-05 12:46:16
onclick处理程序在元素的上下文中执行。
The onclick handler is executed in the context of the element.
myDiv.onclick = function () { alert(this.innerHTML); };
Javascript:动态设置onclick并传入元素本身