标签: jquery ruby-on-rails-3
在用户取消删除确认后,我想在元素上触发对stopPropagation的javascript调用。我无法点击这样做,因为它将阻止显示JS确认对话框。有没有办法将动作绑定到用户取消时?
答案 0 :(得分:1)
if(confirm("Are you sure you want to delete")){ // user has chosen 'Ok' } else { // user has canceled // do your stuff }