There are possibilites in html5 Link
However, mobile devices first return an estimation before they enable their gps. This is because gps takes some time and power.
Here there is a description of how you can bypass this. Link
Take a look at the google maps widget for mobile in the appstore: https://appstore.mendix.com/link/app/Google%20Maps%20for%20Mobile
This has a button saying where am i. So it must be using some method to find the geo location.
When the app is wrapped in cordova (phonegap) you should be able to use the geolocation. See http://docs.phonegap.com/en/1.9.0/cordovageolocationgeolocation.md.html#Geolocation
@Erwin: When I use it in Cordova I have to create a app which is published for instance in the App Store, or am I wrong? I would like to use the geo location of the user on the web application (or when it is bookmarked on homescreen)