【发布时间】:2022-02-21 18:06:12
【问题描述】:
选择器上有功能点击绑定
$(document).on("click", ".onClass", function () {
//your code
var element = $(this); // to get clicked element
});
有没有纯js的类比?
附:我已经看到了这个解决方案How to get the element clicked (for the whole document)?,但这不是我所期待的解决方案。
【问题讨论】:
标签: javascript jquery