2011-10-05 92 views
0
我在與以下功能創建一個網頁的麻煩

:當用戶訪問我的網頁麻煩與網頁製作

此前,我試過使用隱藏的輸入標籤,但它沒有結果。任何想法?

我標記低於

<html> 
<head> 
    <meta http-equiv='refresh' content='1,url=/client'> 
</head> 
<body onload="JavaScript:setTimeout('location.reload(true);',0);"> 
    <input type="hidden" name="id" value="3" /> 
</body> 
</html> 
+1

什麼決定了id值? – mellamokb

+0

你真的是指「刷新」,或發佈? – bfavaretto

+0

請分享您的代碼。 –

回答

0

您可以劫持頁面刷新的東西,POST到您的網頁。

+0

你能詳細解釋一下嗎? – anhldbk

0

你可以使用pushState的更改URL負載,如:

function updateURL(){ 
    window.history.pushState(null, null, "?id=3") 
} 

window.onload=updateURL; 

你也可以使用的location.hash完成類似的東西上不支持一些老的瀏覽器pushState的。