The iPhone supports geolocation in mobile Safari via the following call:
navigator.geolocation.getCurrentPosition(
function(pos){
var lat = pos.coords.
Although I think it's a great practice to standardize on the (draft, by the way) W3C Geolocation API, it's worth noting that there are a few other options in the browser, which can be particularly helpful if you need to target an older platform.
navigator.geolocation with very similar syntax.