how can I sent value to JSP by javascript?
I want to sent latitude and longitude parameters to JSP
<body>
<button onclick="getLocation()">click</button>
<script>
function getLocation() {
if (navigator.geolocation)
navigator.geolocation.getCurrentPosition(displayLocation);
else
alert("Oops, no geolocation support");
}
function displayLocation(position) {
var latitude = position.coords.latitude; // ดึงเอาค่า lat
var longitude = position.coords.longitude; // ดึงค่า long
}
</script>
</body>
I don't know what form i should do
thnk you very much!