Ex No: 14 | RETURN USER LOCATION |
---|---|
Aim: | To write a JavaScript code to return the latitude and logitude of the users current location. |
Algorithm | |
Step1: Create a folder “Ex14” to place the HTML files. | |
Step2: Create HTML file “index.html”. | |
Step3: Use navigator objects geolocation property to get the current position of the user. | |
Step4: Display the Latitude and Logitude of the users current location. | |
Source Code | |
index.html
|
|
Result: | Thus JavaScript code to return the latitude and logitude of the users current location. |