BJ *_*tel 2 javascript url jquery url-rewriting client-side
是否可以重写URL而无需通过jQuery/Javascript重新加载页面?
假设您有以下网址:
http://stackoverflow.com/questions/ask
我们可以追加价值: /pId=XYZ
所以你可以得到
http://stackoverflow.com/questions/ask/pId=XYZ
这可能吗?
所有你可以改变而不重定向是url的哈希部分:
document.location.hash = "whatever";
Run Code Online (Sandbox Code Playgroud)