後面的行爲在我的PHP的網站,當用戶增加了一些自己的購物車我觸發URL變化,使某些功能,並觸發頁面上:改變瀏覽器PHP
原始地址
/category/product/10
新的URL
/category/product/10#addtocartbutton
網址將成爲
/category/product/10?x=1
的方法:
/category/product/10
/category/product/10#addtocartbutton (user clicks an onclick href to submit form)
/category/product/10?x=1 (the form adds the item to the session and appends this URL querystring)
的問題時,他們按BAC b
那麼,您的新網址'/分類/ product/10#addtocartbutton'或'/ category/product/10?x = 1'? –
不要試圖做到這一點。如果可以,請重新設計應用程序,以便每當用戶按下後退按鈕並重新提交表單時,都不會發生任何錯誤。 – reinierpost