>用户单击删除链接(具有“确认”类).>出现确认消息询问“你确定吗?” “是”和“取消”选项.
如果选择“是”,则链接会在单击时继续,但如果选择“取消”,则会取消操作.
更新:由于this guy,确认()的最终工作代码:
$('.confirm').click(function() { return confirm("Are you sure you want to delete this?"); });
if (confirm("Are you sure?")) { // continue with delete }