2016-05-12 40 views
-1

當用戶點擊esc提醒時不應該關閉他應該點擊pay now按鈕進一步移動。點擊esc按鈕不要關閉甜蜜提醒

if($unpaid==true){ 
    echo $print = '<script> 
     function alertOn(){ 
swal({ 
     title: "No Membership Fees Received", 
     text: "Please pay membership fees as per your selected package", 
     type: "warning", 
     confirmButtonText: "PAY NOW" 

     }, 
     function(){ 
     window.location.href = "unpaid.php"; 
    }); 
}; 
window.onload = alertOn 
</script>'; 
+0

有任何人與解決方案 – vivek

回答

1
  if($unpaid==true){ 
      echo $print1 = '<script> 
      function alertOn(){ 
       swal({ 
        title: "No Membership Fees Received", 
        text: "Please pay membership fees as per your selected package", 
        type: "warning", 
        confirmButtonText: "PAY NOW", 
        **allowEscapeKey:false** 

        }, 
        function(){ 
        window.location.href = "unpaid.php"; 
       }); 
      }; 
      window.onload = alertOn; 
     </script>'; 

    }