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