0
HTML5로 geolocation을 시도하고 있습니다. 어떤 이유로 FireFox에서 불일치하게 작동하며 크롬에서는 작동하지 않으며 object positionerror라는 오류가 발생합니다.geolocation HTML5 on firefox and chrome
이 질문에
1.
는) 내가 어떻게 실제 오류 (미안 해요 자바 스크립트에 새로운 오전) 2) 왜 크롬 및 파이어 폭스에서 다르게 작동하는지 볼 수 있습니까?스크립트는 다음과 같습니다 -
<script>
if(!navigator.geolocation) {
alert ('your browser sux');
} else {
navigator.geolocation.getCurrentPosition(success, error);
}
function success(position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
document.write(lat + ', ' + lng);
}
function error(error) {
alert ('damn error' +error);
}
ok 어떻게 크롬에서 이것을 디버깅합니까? – sammy
감사합니다. 이것은 지금 시도해 보는 것이 좋다. – sammy