jQuery获取当前按钮的id

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

猜你喜欢

转载自www.cnblogs.com/aaronthon/p/10883353.html