HTML5 Geolocation API lets you share your location with your favourite web sites. A Javascript can capture your latitude and longitude and can be sent to backed web server and do fancy location-aware things like finding local businesses or showing your location on a map.
Using With HTML5, We can find longitude and latitude. sample code of the examples are available at below.
You can get source code at here