📌  相关文章
📜  查询选择器点击事件 - Javascript 代码示例

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

代码示例2
var deleteLink = document.querySelector('.delete');

deleteLink.addEventListener('click', function(event) {
    event.preventDefault();

    var choice = confirm("sure u want to delete?");
    if (choice) {
        return true;
    }
});