0

Ok, probably a stupid question. But here goes... I know on regular websites a hashtag is an anchor to an element on the page, however, how does this work in mobile devices? It seems to me that mobile devices can use hashtags to slide to another section on the same page, sort of like another page.

How do urls work like that in mobile devices?? I've been to the jquerymobile.com site and noticed the webapp builder on the homepage, offers the ability to change features to slide, slideup, slidedown, fade, pop, etc. etc., however, the only URL to choose from is always "HOME" for these features. And home points to #page1, which is odd that it has a hashtag in it. How do mobile devices work with these hashtags? More importantly, how do I add the ability to slide to that hashtag, as in the way jquerymobile.com implies in the webapp builder?

I've tried doing my own research on this via google, but no luck, as mobile hashtags keeps bringing up other results, not what I am asking for here.

4

1 回答 1

0

在桌面浏览器和移动浏览器中处理 URL 的哈希部分没有区别。关键是 Javascript 可以访问 URL,包括哈希部分,并且可以根据 URL 的内容做任何程序化的事情。因此,如果页面作者想要滑入另一个部分以响应更改 URL 的哈希部分,他们可以这样做。人们也在“桌面”网站上做同样的事情。

于 2013-08-30T02:37:59.960 回答