function onError(data) { alert(JSON.stringify(data)); document.getElementById('tip').innerHTML = '定位失败'; }