Last active
December 18, 2016 18:40
-
-
Save Rplus/bb492eb06c5ee4703029f5e3ce8e6c25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<script> | |
if ("geolocation" in navigator) { | |
navigator.geolocation.getCurrentPosition(function(position) { | |
document.body.innerHTML = [position.coords.latitude, position.coords.longitude].join('<br>'); | |
}); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment