-
Notifications
You must be signed in to change notification settings - Fork 0
/
Formulario.html
67 lines (48 loc) · 1.55 KB
/
Formulario.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
65
66
67
<!DOCTYPE html>
<html>
<head>
<title>MEU TRABALHO DE HTML</title>
<meta charset="utf-8"/>
<link href="VisualFormulario.css" rel="stylesheet" media="all" />
<!--<script type=”text/JavaScript.js”> </script>
-->
<script type="text/javascript">
function Enviar() {
var nome = document.getElementById("nomeid").value;
var tel = document.getElementById("telid").value;
if (nome.value != "") {
alert('Seus dados foram salvos ');
}
sessionStorage.setItem('nomeid', nome);
sessionStorage.setItem('telid', tel);
window.location.href = "Formulario2.html";
}
function Limpar() {
document.getElementById("emailid").value = "";
}
</script>
</head>
<body>
<form name="meu_form">
<h1>FORMULARIO</h1>
<p class="nome">
<input type="text" id="nomeid" placeholder="Digite um nome" required="required" name="nome" />
<label for="nome">Nome</label>
</p>
<p class="tel">
<input type="text" id="telid" placeholder="(xx)xx-xx-xx-xx" name="tel" />
<label for="tel">Tel</label>
</p>
<p>
<input type="email" id="emailid" placeholder="[email protected]" name="email" />
<label for="email">Email</label>
</p>
<p>
<button type="button" onclick="Enviar();">Enviar</button>
</p>
<p>
<button type="button" onclick="Limpar();">Limpar</button>
</p>
</form>
</body>
</html>