我正在学习“Jquery Mobile”编程。
我写了一个程序,但它不起作用。
<html><head>
<link rel="stylesheet" href='../jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.css' />
<link rel="stylesheet" href='../jquery.mobile-1.4.5/jquery.mobile-1.4.5.css' />
<script type='text/javascript' src='../jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js'></script>
<script type='text/javascript' src='../jquery.mobile-1.4.5/demos/js/jquery.min.js'></script></head>
<body>
<div data-role="page" id="pageone">
<div data-role="page" id="pageone">
<div data-role="header">
<h1>Welcome To My Homepage</h1>
</div>
<div data-role="main" class="ui-content">
<p>Click on the link to see the slide effect (slides to the next page from right to left).</p>
<a href="#pagetwo" data-transition="slide">Slide to Page Two</a>
</div>
<div data-role="footer"> <h1>Footer Text</h1> </div>
</div>
<div data-role="page" id="pagetwo">
<div data-role="header">
<h1>Welcome To My Homepage</h1>
</div>
<div data-role="main" class="ui-content">
<p>Click on the link to see the slide effect REVERSED (slides to the previous page from left to right).</p>
<a href="#pageone" data-transition="slide" data-direction="reverse">Slide to Page One (reversed)</a>
</div>
<div data-role="footer"> <h1>Footer Text</h1> </div>
</div>
</body></html>
css 样式和数据角色属性无法正常工作。它只是一次将两个页面显示为 HTML 页面。
.css 文件和 .js 文件位于正确的路径中。