Files
JavaScript-from-Beginner-to…/Chapter 13/ch13-geo-getlocation.html
T
2021-09-04 21:22:51 +02:00

16 lines
264 B
HTML
Executable File

<html>
<body>
<script>
window.onload = init;
function init() {
navigator.geolocation.getCurrentPosition(showGeoPosition);
}
function showGeoPosition(data) {
console.dir(data);
}
</script>
</body>
</html>