0
如果我在頁面
test.php的?參數1 =一些&參數2 =一些
,我執行腳本
<script type="text/javascript">
$(document).ready(function($)
{
//window.location.replace(window.location.href);
//window.location.href += "#mypara";
//location.href.reload();
location.reload();
});
</script>
location.reload()函數失去任何$ _GET參數(注意,我嘗試使用window.location.replace()函數時沒有任何結果)。
看起來位置重新加載具有正確的location.href與正確的參數,但請求發送到服務器沒有$ _GET設置,通過調試與PhpStorm的確的我看不到$ _GET設置。
在互聯網上搜索當發佈location.reload()時,我發現沒有工作解決方案傳遞$ _GET參數。
現在我運行location.reload上http://stackoverflow.com/questions/29431408/javascript-location-reload-loses-parameters-empty-get?as=as和參數不去 – Legendary 2015-04-03 11:34:19
嘗試location.reload(真正) – 2015-04-03 11:35:51