-
Notifications
You must be signed in to change notification settings - Fork 1
/
palavra.html
64 lines (53 loc) · 1.85 KB
/
palavra.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Inserir Palavra</title>
<link rel="stylesheet" href="css/geral.css">
<link rel="stylesheet" href="css/palavra.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<div id="add-word">
<form action="addWord.php" method="post" id="form">
<h1>Insere uma palavra que associes <br>ao local onde te encontras:</h1>
<input id="input" type="text" name="textdata"><br>
<input id="button" type="submit" name="submit" value="Ver no mapa">
<textarea name="latitude" id="latitude"></textarea>
<textarea name="longitude" id="longitude"></textarea>
</form>
</div>
<div class="nav-menu">
<div id="burger-wrap">
<a class="burger"><span></span></a>
</div>
<div class="menu-list">
<ul>
<li><a href="mapa_index.php">Mapa</a></li>
<li><a href="projeto.html">Sobre</a></li>
<li><a href="equipa.html">A Equipa</a></li>
<li><a href="palavra.html">Inserir Palavra</a></li>
</ul>
</div>
</div>
</body>
</html>
<script src="menu.js"></script>
<script>
window.onload=function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";
}
}
function showPosition(position) {
var lat = position.coords.latitude ;
var long = position.coords.longitude;
document.getElementById("latitude").innerHTML = long;
document.getElementById("latitude").style.display = "none";
document.getElementById("longitude").innerHTML = lat;
document.getElementById("longitude").style.display = "none";
}
</script>