Extremely basic example of the W3C Geolocation API

If your browser supports Geolocation, you should get a JavaScript alert with your coordinates.

This is a basic example from How to use the W3C Geolocation API article on Dev.Opera.