Javascript PHP中的确认框

Javascript PHP中的确认框,javascript,php,jquery,confirmation,Javascript,Php,Jquery,Confirmation,在按下if子句中的提交按钮后,我试图弹出一个确认框。如果单击“确定”,PHP脚本将继续,如果单击“取消”,它将停止 if(isset($_POST['submit'])) { $get_randeman = $_POST['randeman_realize']; if($get_randeman < $randeman_min) { echo '<script>confirm("Are you sure?"); if(confirm(

在按下
if
子句中的提交按钮后,我试图弹出一个确认框。如果单击“确定”,PHP脚本将继续,如果单击“取消”,它将停止

if(isset($_POST['submit'])) {
   $get_randeman = $_POST['randeman_realize'];
   if($get_randeman < $randeman_min) {
      echo '<script>confirm("Are you sure?");
          if(confirm("Are you sure?") == false) {
             return;
          } else {
          continue;
         }
   </script>';
} else {

//proceed
if(isset($\u POST['submit'])){
$get_randeman=$_POST['randeman_realize'];
如果($get_randeman<$randeman_min){
echo'确认(“你确定吗?”);
if(确认(“您确定吗?”)==false){
返回;
}否则{
继续;
}
';
}否则{
//进行

您需要这样的东西:

<a href="http://www.google.com" onclick='
            if(confirm("Are you sure?") == false) {
                return false;
            } else {
                //
            }'>google.com</a>

在php中,如何在客户端(javascript、jquery)实现这一点