<?phpecho "<script> if(confirm( '请选择跳转页面,是跳转到yes.html 否跳转到no.html? ')) location.href='yes.html';else location.href='no.html'; </script>"; ?>
双选确认框,选择后继续弹出确认对话框
<?phpecho "<script> var sure=confirm( '确认你的操作吗 '); if (1==sure){alert( '你选择了是 ')} else {alert( '你选择了否 ');}</script>";?>
弹出确认框,点击确定跳转到目标页面
<?php echo "<script> {window.alert('发布成功');location.href='aa.html'} </script>";?>
以上就是php怎么点击按钮弹出确认框的详细内容。
