Jquery mobile 链接到不同html页面中的虚拟页面:JQuery Mobile
我的移动应用程序index.html和individual.html中有2个html页面。Index.html页面包含许多虚拟页面。我在individual.html页面中有一个按钮。我想将它链接到index.html中的一个虚拟页面 可能吗 具体怎么做 请帮忙Jquery mobile 链接到不同html页面中的虚拟页面:JQuery Mobile,jquery-mobile,Jquery Mobile,我的移动应用程序index.html和individual.html中有2个html页面。Index.html页面包含许多虚拟页面。我在individual.html页面中有一个按钮。我想将它链接到index.html中的一个虚拟页面 可能吗 具体怎么做 请帮忙 谢谢您可以在individual.html中创建链接按钮,如下所示:链接如下: <a data-role="button" rel="external" href="index.html#your_virtual_page">
谢谢您可以在
individual.html
中创建链接按钮,如下所示:链接如下:
<a data-role="button" rel="external" href="index.html#your_virtual_page">BUTTON</a>
-individual.html
:
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile.structure-1.1.1.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head>
<body>
<div id="home" data-role="page">
<div data-role="content">
HOME
</div>
</div>
<!-- THE VIRTUAL PAGE THAT WE WANT TO ACCESS FROM individual.html -->
<div id="p2" data-role="page">
<div data-role="content">
PAGE 2!!!
</div>
</div>
</body>
</html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile.structure-1.1.1.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head>
<body>
<div id="home" data-role="page">
<div data-role="content">
<!-- YOUR LINK TO YOUR VIRTUAL PAGE IN index.html -->
<a data-role="button" rel="external" href="./index.html#p2">TO PAGE 2</a>
</div>
</div>
<div id="p1" data-role="page">
<div data-role="content">
P1
</div>
</div>
</body>
</html>
P1
希望这对mate有所帮助。您可以在
individual.html
中创建链接按钮,如下所示:链接如下:
<a data-role="button" rel="external" href="index.html#your_virtual_page">BUTTON</a>
-individual.html
:
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile.structure-1.1.1.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head>
<body>
<div id="home" data-role="page">
<div data-role="content">
HOME
</div>
</div>
<!-- THE VIRTUAL PAGE THAT WE WANT TO ACCESS FROM individual.html -->
<div id="p2" data-role="page">
<div data-role="content">
PAGE 2!!!
</div>
</div>
</body>
</html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile.structure-1.1.1.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
</head>
<body>
<div id="home" data-role="page">
<div data-role="content">
<!-- YOUR LINK TO YOUR VIRTUAL PAGE IN index.html -->
<a data-role="button" rel="external" href="./index.html#p2">TO PAGE 2</a>
</div>
</div>
<div id="p1" data-role="page">
<div data-role="content">
P1
</div>
</div>
</body>
</html>
P1
希望这对你有帮助