01 <!DOCTYPE html>
02 <
html
lang
=
"en"
>
03 <
head
>
04 <
metacharset
=
"UTF-8"
>
05 <
meta
name
=
"viewport"
content="
width
=
device
-width,
initial-scale
=
1
.0,
06
minimum-scale
=
1
,
maximum-scale
=
1
.0,
user-scalable
=
no
">
07 <
title
>第7章 7.1节 位置操作接口</
title
>
08
09 <
script
src
=
"./js/jquery-1.11.2.min.js?1.1.10"
></
script
>
10
11 <
scriptsrc
=
"http://res.wx.qq.com/open/js/jweixin-1.0.0.js?1.1.10"
></
script
>
12
13 <
script
src
=
"./js/cookie.js?1.1.10"
></
script
>
14
15 <
script
src
=
"./js/wxJSSDK.js?1.1.10"
></
script
>
16
17 <
script
src
=
"location.js?1.1.10"
></
script
>
18 <
style
>
19 input{
20 width: 100%;
21 padding: 0.2em;
22 background-color: #5eb95e;
23 font-size: 1.4em;
24 background-image: linear-gradient(to bottom, #62c462, #57a957);
25 background-repeat: repeat-x;
26 color: #ffffff;
27 text-align: center;
28 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
29 border-radius: 0.3em;
30 }
31 #info{
32 border-left: 3px solid#03a9f4;
33 background-color: #5eb95e;
34 color: #ffffff;
35 border-radius: 0.3em;
36 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
37 }
38 </
style
>
39 </
head
>
40 <
body
>
41 <
h1
style
=
"font-size: 8em"
>:)</
h1
>
42 <
b
style
=
"font-size: 3em"
>位置操作接口!</
b
><
br
/><
br
/>
43 <
div
id
=
"info"
>
44 <
p
>纬度:<
em
id
=
"latitude"
>无</
em
></
p
>
45 <
p
>经度:<
em
id
=
"longitude"
>无</
em
></
p
>
46 <
p
>速度:<
em
id
=
"speed"
>无</
em
></
p
>
47 <
p
>位置精度:<
em
id
=
"accuracy"
>无</
em
></
p
>
48 </
div
>
49 <
input
type
=
"button"
value
=
"获取当前地理位置信息"
id
=
"getLocation"
/>
50 </
body
>
51 </
html
>