我有一个没有数据库的jquery移动应用程序模板(后端)。我想在这个项目中添加一个json文件
我的json文件
{
"contact": [
{
"firstName": "Clark",
"lastName": "Kent",
"job": "Reporter",
"location": "Delhi",
"address": "No33 Villa",
"phone": "9988xx99xx",
"mobile": "9988xx99xx"
},
{
"firstName": "Bruce",
"lastName": "Wayne",
"job": "Playboy",
"location": "Mumbai",
"address": "No33 Villa",
"phone": "9988xx99xx",
"mobile": "9988xx99xx"
},
{
"firstName": "Peter",
"lastName": "Parker",
"job": "Photographer",
"location": "Chennai",
"address": "No33 Villa",
"phone": "9988xx99xx",
"mobile": "9988xx99xx"
}
]
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Contact Info</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="jquery.mobile.structure-1.0.1.css" />
<link rel="apple-touch-icon" href="images/launch_icon_57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="images/launch_icon_72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="images/launch_icon_114.png" />
<link rel="stylesheet" href="jquery.mobile-1.0.1.css" />
<link rel="stylesheet" href="custom.css" />
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.mobile-1.0.1.min.js"></script>
</head>
<body>
<div data-role="page" id="home" data-theme="c">
<div data-role="content">
<div id="branding">
<h1>Contact Info</h1>
</div>
<div class="choice_list">
<h1> What are you searching? </h1>
<ul data-role="listview" data-inset="true" >
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
<li><a href="choose_town.html" data-transition="slidedown"> <h3> xxx(json job title here)</h3></a></li>
</ul>
</div>
</div>
</div><!-- /page -->
</body>
</html>
&#13;