jQuery Mobile的页面结构如下:
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<!--统一编码,避免乱码-->
<meta charset="utf-8"/>
<!--配置页面根据设备的屏幕进行缩放-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="jquery.mobile-1.0.css" />
<!--jQuery文件一定要再jQuery mobile文件添加引用,否则自动初始化会失败-->
<script type="text/javascript" src="jquery-1.6.4.js"></script>
<!--这里放自定义的 js文件-->
<script type="text/javascript" src="jquery.mobile-1.0s.js"></script>
</head>
<body>
<div data-role="page">
<!--页面头部分,主要放标题,导航按钮-->
<div data-role="header"> ... </div>
<!--页面主题部分-->
<div data-role="content">...</div>
<!--页脚部分-->
<div data-role="footer">...</div>
</div>
</body>
</html>