Home > Backend Development > PHP Tutorial > 微信开发中 jssdk 中 jsapi的返回值如何在php中获取

微信开发中 jssdk 中 jsapi的返回值如何在php中获取

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:31:05
Original
1178 people have browsed it

php微信

jsapi alert 出来的返回值 图片说明
var getLocation = document.getElementById('getLocation');
getLocation.onclick = function(){

<code>                //使用getLocation接口获取地理位置坐标                                    wx.getLocation({                    success:function(res){                        var latitude = res.latitude; // 纬度,浮点数,范围为90 ~ -90                                                    var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。                        var speed = res.speed; // 速度,以米/每秒计                        var accuracy = res.accuracy; // 位置精度                        alert(JSON.stringify(res));                    },                    cancel:function(res){                        alert('用户拒绝授权获取地理位置');                    },                });            };</code>
Copy after login
<code></code>
Copy after login
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template