我想在更新後在當前頁面視圖中重定向用戶。請看我的代碼。請幫我解決這個問題。我不熟悉JavaScript。如何將php變量傳入js事件window.location
echo '<script type="text/javascript">';
echo 'var myvar = $currString ';
echo 'alert("Cash fund has been updated"); window.location = "../cashfund.php?terminalid='+myvar+'"';
echo '</script>';
謝謝
它不工作。 – Jason
是$ currString url編碼的嗎? –
在登陸頁面?是。 – Jason