<!DOCTYPE html>

<html>
    <head>
        <title>geolocation</title>
    </head>
    <body>
        <script>
        
            navigator.geolocation.getCurrentPosition(function(position) {
                document.write(position.coords.latitude + ', ' + position.coords.longitude);
            });

        </script>
    </body>
</html>