Advertisement
Guest User

Get_GPS_Location

a guest
Feb 8th, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <script>
  2. var�x = document.getElementById("demo");
  3. function�getLocation() {
  4. ����if(navigator.geolocation) {
  5. ������� navigator.geolocation.getCurrentPosition(showPosition);
  6. ��� }�else�{
  7. ������� x.innerHTML ="Geolocation is not supported by this browser.";
  8. ��� }
  9. }
  10. functionshowPosition(position) {
  11. ��� x.innerHTML ="Latitude: "�+ position.coords.latitude +�
  12. ����"<br>Longitude: "�+ position.coords.longitude;�
  13. }
  14. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement