js中的确定取消对话窗口
<button onclick="test()">点我吧</button>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script>
function test() {
if (window.confirm('您确定删除此文件吗?')) {
alert('你点了确定');
} else
{
alert('你点了取消');
}
}
</script>

相关文章:

  • 2021-11-12
  • 2022-12-23
  • 2021-06-11
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案