The iPhone supports geolocation in mobile Safari via the following call:
navigator.geolocation.getCurrentPosition(
function(pos){
var lat = pos.coords.
As of today, the W3C Geolocation API (widely associated with, though not technically part of, HTML 5) is support in the following major desktop browsers:
There are at least two mobile browsers that implement the Geolocation API:
On all of these platforms, you should be able to use navigator.geolocation.getCurrentPosition, etc.