jquerymobile教程:[1]helloworld
1、选择一款合适的IDE,如:Dreamweaver CS6、Visual Studio、Myeclipse2014等
这里笔者使用Myeclipse2014举例
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/f59dbe39131fceeca5fb7cc079c4ec9958430bbb.jpg)
2、启动Myeclipse2014,选择新建html5 手机应用工程
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/3852f6e5eceeadbc380d52c5cd18dfdae53b7bbb.jpg)
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/30601b6104a355e9148cfd62d22ae3efe17868bb.jpg)
3、新建html5 手机应用工程,命名--》选择jquery Mobile
完成
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/031231632385e03647b3525db8e039723c035abb.jpg)
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/3fc72e486143d7d4e713115e7da75f0f832b50bb.jpg)
4、查看工程目录,在web app 开发时,重点关注下www目录
其中index.html是程序入口,js/css文件夹分别存放js和css文件(目前已有JQM需要的库文件)
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/27725684cde34b2ce8cc6eca0d0e7c75e4f443bb.jpg)
5、点开index.html,修改代码,例如:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="A single-page template generated by MyEclipse Mobile Tools"/>
<title>Single-Page Application</title>
<link rel="stylesheet" href="./css/jquery.mobile-1.3.0.css"/>
<script type="text/javascript" src="./js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="./js/jquery.mobile-1.3.0.js"></script>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div data-role="page">
<div data-role="header" >
<h1>Single-Page Application </h1>
</div><!-- /header -->
<div data-role="content" >
<h1>Hello World</h1>
</div><!-- /content -->
<div data-role="footer" data-position="fixed" >
<h4>Footer content</h4>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>
6、选中工程,右击-》run as-》Mobile Web Simulator Application-》选择android启动
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/0da37be7340f6478d801ab0cfd3e21c2bad6b5bb.jpg)
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/b1454a1bd10ff226d6b824bb9c99e92abbb8a4bb.jpg)
7、查看模拟器效果,如图
![jquerymobile教程:[1]helloworld](https://exp-picture.cdn.bcebos.com/c255efc595ee41c15105b9e68d88912ca4ca9bbb.jpg)