How to confirm clicking on a link using jQuery

后端 未结 5 1737
攒了一身酷
攒了一身酷 2021-02-13 15:23

I have many links in a HTML-table, which delete corresponding row, when clicked (calling a PHP-script via GET parameter).

They all have a class delete_row

5条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-13 16:02

    Try this.

    $('.delete_row').click(function(){
        return confirm("Are you sure you want to delete?");
    })
    

提交回复
热议问题