Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 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