【发布时间】:2013-07-01 11:50:06
【问题描述】:
我目前正在使用 JQuery mobile 开发一个移动网站。我在foobar.html 中使用多个页面进行如下导航:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style/jquery.mobile-1.3.1.css" />
<script src="jquery-js/jquery-1.10.1.js"></script>
<script src="jquery-js/jquery.mobile-1.3.1.js"></script>
<title>Foobar</title>
</head>
<body>
<div data-role="page" id="foo">
<div data-role="content">
<a href="#bar" data-role="button">Go to Bar</a>
</div>
</div>
<div data-role="page" id="bar">
<div data-role="content">
<p>Bar</p>
</div>
</div>
</body>
我加载了foobar.html 文件,点击转到栏,它工作正常;但是,当我从 index.hmtl 导航到 foobar.html 并再次测试时,链接无法正常工作。刷新页面即可解决问题。
什么可以解释这种行为以及如何解决它?
【问题讨论】:
标签: html jquery-mobile