FAQ |
Kalender |
![]() |
#1 | |||
|
||||
Mycket flitig postare
|
Är helt novis på javascript så jag tänkte be om lite tips. Jag tänkte mig något liknande för att hämta en adress baserat på W3C:S Geolocation API, skulle det kunna fungera?
Kod:
function GeoDecode(position) { var MyAdress = ('geoencode.php?lat=' + position.coords.latitude + '&lon=' + position.coords.longitude); document.getElementById('adressField').innerHTML = MyAdress; } if (navigator.geolocation) { // Geo request navigator.geolocation.getCurrentPosition(GeoDecode); } |
|||
![]() |
![]() |
|
|