📜  单击后禁用锚标记 jquery - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:59.993000             🧑  作者: Mango

代码示例1
$('.btn').on('click', function(e) {
    e.preventDefault();
    $(this).off("click").attr('href', "javascript: void(0);");
   //add .off() if you don't want to trigger any event associated with this link
});