jQuery获取当前按钮的id

function test(e) {
    $(e.target).attr('id')
} // 记得带上点击事件

 

posted @ 2019-05-17 19:49  aaronthon  阅读(3470)  评论(0编辑  收藏  举报