链接到内部页面
一般,页面是由许多不同的页面所组成的。由于移动应用的页面一般都是比较简单的,所以可以很容易在一个单独的页面中进行管理,在这个页面中,可以设置多个DIV层,一个紧跟着另外一个,为了在不同的内部页面之间实现导航,可以使用象HTML中的锚点的语法,下面是一个例子:
<div data-role="page" id="home">
...
<div data-role="content">
<p><a href="#epwzf">Easy PHP Websites with the Zend Framework</a></p>
</div>
...
</div>
<div data-role="page" id="epwzf">
<div data-role="header">
<h1>WJGilmore, LLC</h1>
</div>
<div data-role="content">
<strong>Easy PHP Websites with the Zend Framework</strong><br />
<p>
<em>Easy PHP Websites with the Zend Framework</em> is the ultimate
introduction to the popular Zend Framework, covering practical topics
including Doctrine, Zend_Db, Zend_Test, automated deployment, and much
more!
</p>
</div>
<div data-role="footer">
<h1>Copyright © 2010 W.J. Gilmore, LLC</h1>
</div>
...
<div data-role="content">
<p><a href="#epwzf">Easy PHP Websites with the Zend Framework</a></p>
</div>
...
</div>
<div data-role="page" id="epwzf">
<div data-role="header">
<h1>WJGilmore, LLC</h1>
</div>
<div data-role="content">
<strong>Easy PHP Websites with the Zend Framework</strong><br />
<p>
<em>Easy PHP Websites with the Zend Framework</em> is the ultimate
introduction to the popular Zend Framework, covering practical topics
including Doctrine, Zend_Db, Zend_Test, automated deployment, and much
more!
</p>
</div>
<div data-role="footer">
<h1>Copyright © 2010 W.J. Gilmore, LLC</h1>
</div>
你会发现,在链接中,通过使用锚点的方法,可以跳转到ID为epwzf的DIV层。下图是实际的效果,注意的是,jQuery Mobile为其生成了自动的返回的按钮。