JavaScript在使用PHP / MYSQL删除之前确认 [英] JavaScript Confirm before deletion with PHP/MYSQL

查看:95
本文介绍了JavaScript在使用PHP / MYSQL删除之前确认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里尝试了很多例子,但我可以让我的代码在删除之前显示一个弹出窗口。我可以在这里找到我使用的代码:

I have tried a number of examples here but I can get my code to actually show a popup window before deletion. The code I use can be found here:

推荐答案

  <script type="text/javascript">
      function ConfirmDelete()
      {
            if (confirm("Delete Account?"))
                 location.href='linktoaccountdeletion';
      }
  </script>


  echo '<input type="button" onclick="ConfirmDelete()" value="DELETE ACCOUNT">';

这篇关于JavaScript在使用PHP / MYSQL删除之前确认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆