Firefox 3.6 锚链接 - 功能不正确

发布于 2025-01-01 18:06:59 字数 633 浏览 4 评论 0原文

我有一个 jQuery Mobile 站点,它使用锚标记进行导航。该网站的 URL 类似于 http://domain_name_here.com/smartphone/home.jsp。当我导航到网站内的某个页面(例如产品)时,链接会将您带到#product?id=XXX,并且一切正常。

但是,在 Firefox 3.6 中,我有一个链接可将用户带到 #home Back ; 但当用户单击它时,他们会被带到“#/smartphone/home.jsp”,而不是预期的“#home”。单击上面定义的链接后,Firefox 3.6 中的 URL 看起来像“http://domain_name_here.com/smartphone/#smartphone/home.jsp”。这个问题似乎是 Firefox 3.6 独有的,并且在所有其他浏览器上都运行得很好。

我想知道其他人是否遇到过这个问题,如果是的话,有什么办法可以解决它。使用哈希标签的目的是不重新加载页面,因此需要再次加载页面的解决方案是无效的。

I have a jQuery Mobile Site that is using anchor tagging for navigation. The site has a URL like http://domain_name_here.com/smartphone/home.jsp. When I navigate to a page within the site, for example a product, a link would take you to #product?id=XXX and everything works fine.

However, in Firefox 3.6, I have a link that takes users to #home <a href="#home" data-icon="arrow-l" data-direction="reverse">Back</a> but when a user clicks on it, they are taken to "#/smartphone/home.jsp" instead of the expected "#home." The URL in Firefox 3.6 looks like "http://domain_name_here.com/smartphone/#smartphone/home.jsp" after clicking on the link defined above. This problem seems unique to Firefox 3.6 and it works perfectly fine on all other browsers.

I was wondering if anyone else has experienced this problem, and if so, is there anyway to fix it. The point of using the hash tag is to not reload the page, so a solution that would require the page being loaded again is not valid.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文