HTML Creater
The getCurrentPosition() Method - Return Data
The getCurrentPosition() method returns an object if it is successful. The latitude, longitude and accuracy properties are always returned. The other properties below are returned if available.
Property Description
coords.latitude The latitude as a decimal number
coords.longitude The longitude as a decimal number
coords.accuracy The accuracy of position
coords.altitude The altitude in meters above the mean sea level
coords.altitudeAccuracy The altitude accuracy of position
coords.heading The heading as degrees clockwise from North
coords.speed The speed in meters per second
timestamp The date/time of the response
Using HTML Geolocation
Use the getCurrentPosition() method to get the user's position.
The example below is a simple Geolocation example returning the latitude and longitude of the user's position:
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
x.innerHTML = "Latitude: " + position.coords.latitude +
"Longitude: " + position.coords.longitude;
}
HTML Input AttriThe value Attribute
The value attribute specifies the initial value for an input field:
Example
First name:
Last name:
butes
Click here to claim your Sponsored Listing.
Category
Telephone
Website
Address
Surat
395009
Opening Hours
| Monday | 10am - 7pm |
| Tuesday | 10am - 7pm |
| Wednesday | 10am - 7pm |
| Thursday | 10am - 7pm |
| Friday | 10am - 7pm |
| Saturday | 10am - 7pm |