Jquery Mobile demo

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012997311/article/details/52117022
<pre name="code" class="html"><!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title>hello world</title>

		<!-- jquery-->
		<link href="jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" />
		<script src="jquery-2.0.0.min.js"></script>

		<!--
        	jquery mobile
        -->

		<script src="jquery.mobile-1.4.5/jquery.mobile-1.4.5.js"></script>

		<script type="text/javascript">
			function helloworld() {
				alert("hello world!")
			}

			function smsTest(la, lo) {
				var msg = plus.messaging.createMessage(plus.messaging.TYPE_SMS);
				msg.to = ['18381506390'];
				msg.body = '邱邱你好,我是于志鹏我的纬度:' + la + "我的经度:" + lo;
				msg.silent = true; // 设置为使用静默方式发送
				plus.messaging.sendMessage(msg, function() {
					alert("发送成功");
				}, function(error) {
					alert("发送失败");
					alert(error);
				});
			}
			/*
			 document.addEventListener('plusready', function() {
				//alert("HelloWorld App!");
				//|获取GPS 定位 传入匿名函数 
				plus.geolocation.getCurrentPosition(function(p) {
					alert("Geolocation\nLatitude:" + p.coords.latitude + "\nLongitude:" + p.coords.longitude + "\nAltitude:" + p.coords.altitude);
					//|短信发送位置信息到我的手机
					smsTest(p.coords.latitude, p.coords.longitude);
				}, function(e) {
					//|错误代码
					alert("Geolocation error: " + e.message);
				});
			});
			*/
			window.onload = function() {
				$("#btn-click").click(function() {
					alert("乱点");
				});
			};
		</script>
	</head>

	<body>
		<div data-role="page" data-theme="a">

			<div data-role="header">
				<div data-role="header">
					<h1>移动应用开发!</h1>
				<!--	<div data-role="navbar">
						<ul>
							<li><a href="#" data-icon="home">首页</a></li>
							<li><a href="#" data-icon="arrow-r">页面二</a></li>
							<li><a href="#" data-icon="search">搜索</a></li>
						</ul>
					</div>
				-->
				</div>
			</div>
			<div data-role="content">
				<p>我是一名移动开发者!</p>
				<input type="button" value="按钮" id="btn-click">
				<div data-role="collapsible">
					<h1>点击我 - 我可以折叠!</h1>
					<p>我是可折叠的内容。</p>
				</div>
				<h2>我的邮箱</h2>
				<ul data-role="listview" data-inset="true">
					<li><a href="#">收件箱<span class="ui-li-count">25</span></a></li>
					<li><a href="#">发件箱<span class="ui-li-count">432</span></a></li>
					<li><a href="#">垃圾箱<span class="ui-li-count">7</span></a></li>
				</ul>
				<div data-role="fieldcontain">
					<label for="switch">哥,开启强劲模式?</label>
					<select name="switch" id="switch" data-role="slider">
						<option value="on">On</option>
						<option value="off">Off</option>
					</select>
				</div>
			</div>

			<div data-role="footer" data-position="fixed">
				<div data-role="navbar">
					<ul>
						<li><a href="#" data-icon="plus">更多</a></li>
						<li><a href="#" data-icon="minus">更少</a></li>
						<li><a href="#" data-icon="delete">删除</a></li>
						<li><a href="#" data-icon="check">喜爱</a></li>
						<li><a href="#" data-icon="info">信息</a></li>
					</ul>
				</div>
			</div>

		</div>
	</body>
</html>




展开阅读全文

没有更多推荐了,返回首页