Javascript confirm dialog

后端 未结 5 873
野性不改
野性不改 2021-02-05 15:59

I want to add a confirm dialog to a delete button to ask the user whether it is ok or not deleting the selected item.

If not, nothing should happend, else a url should be

5条回答
  •  野性不改
    2021-02-05 16:51

    Consider what happens if the user has javascript disabled, or if google comes along and spiders the link. Will your entity be deleted?

    A better way would be to post a form to delete.

提交回复
热议问题