Javascript jquerymobile中的多HTML页面
最近,我开始使用jquerymobile开发一款原生android应用程序(带有phoneGap) 这是我的index.html:Javascript jquerymobile中的多HTML页面,javascript,android,html,jquery-mobile,Javascript,Android,Html,Jquery Mobile,最近,我开始使用jquerymobile开发一款原生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.
<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>
第2页
加载设备属性
页脚
我怎么做?!
我尝试了很多方法,但都做不到
对我来说很重要的是,链接将使用Ajax
对不起,我的英语不好
谢谢:)有很多方法可以从不同的文件中嵌入html。请查看链接以了解更多信息
最好的方法之一是HTML中的内联框架或iframe标记。JQM是否不包含替换特定DIV中页面的函数?!