-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselecionandoElementos3.html
43 lines (38 loc) · 1.05 KB
/
selecionandoElementos3.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Selecionar Elementos #03</title>
<link rel="stylesheet" href="css/estilo.css">
<style>
form {
display: flex;
flex-direction: column;
}
form input,
form select,
form button {
margin: 10px;
font-size: 1.6em;
}
</style>
</head>
<body class="conteudo exercicio">
<h1>Formulário</h1>
<form name="pesquisa" action="http://www.google.com.br/search">
<input type="text" name="q" placeholder="Digite o termo...">
<select name="hl">
<option value="pt-br">Português (Brasil)</option>
<option value="en-us">Inglês (Americano)</option>
</select>
<button>Pesquisar</button>
</form>
<script>
console.log(document.forms)
console.log(document.forms[0])
console.log(document.getElementsByName('pesquisa'))
console.log(document.pesquisa)
console.log(document.pesquisa.q)
</script>
</body>
</html>