[英]how to pass query string in a multipage html document
我有 2 頁的 html 文檔,正在使用 html5、jquery 和 jquery mobile。 我需要將一個值從一個頁面傳遞到另一個頁面。 我正在使用像 test.html#page-b 這樣的 url。 如何通過此 url 傳遞查詢字符串
您可以執行以下操作:
$(window).load(function() {
window.location.href = window.location.href?qs=XXX
});
您需要在 URL 中的哈希之前有查詢字符串。
test.html?query=string#hash
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.