[英]Multi HTML pages in jQuery Mobile
最近,我开始将jQuery Mobile用于本机android应用程序(带有phoneGap)。
这是我的index.html:
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/rtl.jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="css/style.css">
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="js/rtl.jquery.mobile-1.2.0.min.js"></script>
<title>Untitled Document</title>
</head>
<body>
<div class="all_app_position" data-role="homePage">
<div data-role="header" class="header">
header
</div>
<div class="middle">
Middle contnet
</div>
<div class="footer">
footer content
</div>
</div>
</body>
</html>
我想从第二个html文件导入内容(如下)到中间div。
<div data-role="page" id="about">
<div data-role="header"><h1>Page 2</h1></div>
<div data-role="content"><p id="deviceProperties">Loading device properties...</p></div>
<div data-role="footer"><h4>Footer</h4></div>
</div>
我该怎么做?! 我尝试了很多方法,但没有。
对我来说重要的是,该链接将使用Ajax。
对不起我的英语
谢谢 :)
有很多方法可以嵌入来自不同文件的html。 请查看链接http://webdesign.about.com/od/ssi/a/aa052002a.htm了解更多信息。
最好的方法之一是HTML中的内联框架或iframe标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.