-5
在此代碼中,警告框不起作用。我想重定向頁面並使用alertbox顯示一條消息。我該如何解決它?Javascript alert and back with php
if($stmt){
?>
<script type="text/javascript">
alert("Package Successfully Booked..");
</script>
<?php
header("location:javascript://history.go(-1)");
}
?>
然後把history.go呼叫警報後,而不是試圖把它的標題(這是無意義的BTW)。 –
http://stackoverflow.com/questions/11869662/display-alert-message-and-redirect-after-click-on-accept – soundslikebliss
這裏,重定向頁面是固定的。重定向( '管理員/ AHM /面板'); 。但我沒有固定頁面 – Pavel