window.location 不重新加载参数
window.location doesn't reload with params
我在这里用参数替换 window.location :
window.location.replace('/results/#'+ params);
但这不会使用新参数重新加载页面,
我也在尝试重新加载页面:
window.location.pathname === '/results/' && window.location.reload();
但这将使用旧参数重新加载页面
#
散列不会导致页面重新加载,因为它代表当前页面的一个片段。你可以听听onhashchange
,到时候做点什么。
我在这里用参数替换 window.location :
window.location.replace('/results/#'+ params);
但这不会使用新参数重新加载页面, 我也在尝试重新加载页面:
window.location.pathname === '/results/' && window.location.reload();
但这将使用旧参数重新加载页面
#
散列不会导致页面重新加载,因为它代表当前页面的一个片段。你可以听听onhashchange
,到时候做点什么。