本文介绍了想要重定向到特定部分ID的下一页,而不在网址中显示#id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我,请使用javascript解决以下问题.我想使用特定的部分ID重定向到下一页,而无需使用javascript或jquery在URL中显示"#id".

Can anyone help me please using javascript on the following problem.I want to redirect to next page on particular section id without showing "#id" in the url using javascript or jquery.

推荐答案

好吧,我想您可以使用HTML5本地存储存储ID,然后在加载下一页时将其删除并在其中滚动用户.

Well I suppose you could store the id using HTML5 local storage then when you load the next page you can remove it and scroll the user there.

我不建议您这样做.该URL具有id很好,以便用户可以将直接链接到该部分的URL发送给其他人.

I don't recommend that you do this. It's good that the URL has the id so the user can send the URL linking directly to that section to other people.

这篇关于想要重定向到特定部分ID的下一页,而不在网址中显示#id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 11:25