Get geo location of an iOS and Android devices using JavaScript

How to get Geo location of an iOS and Android devices using JavaScript Generally ,whenever  web developer  developing  an mobile website, then most of times they need  to fetch current location of device(ipod,ipad,android). That time we use  JavaScript  to  fetch current location.Which most  used full.