-
Notifications
You must be signed in to change notification settings - Fork 0
/
5.html
93 lines (82 loc) · 1.93 KB
/
5.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<html>
<head>
<title>Mini Curso Frontend</title>
<style>
* {
margin:0;
padding:0;
list-style:none;
}
.main{
width: 100vw;
height: 100vh;
color: #6b6b6b;
font-family: Arial, Helvetica, sans-serif;
background-color: #dce9f5;
}
.main > .header {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
width: 100vw;
height: 60px;
color: #fff;
background-color: #0a518f;
}
.main > .conteudo {
display: flex;
flex-direction: row;
justify-content: center;
width: 100vw;
}
.main > .conteudo > article {
padding-top: 15px;
}
.main > .conteudo .input-new-item{
width: 400px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
.main > .conteudo .input-new-item:focus{
box-shadow: 0 0 1em #0a518f;
}
.main > .conteudo .add-new-item{
padding: 4px 10px;
border-radius: 50px;
color: #fff;
font-weight: bold;
font-size: 20px;
border: 1px solid #0a518f;
background-color: #0b64b3;
}
.main > .conteudo .add-new-item:hover{
box-shadow: 0 0 0.3em #0a518f;
}
</style>
</head>
<body>
<main class="main">
<header class="header">
<h1>My To Do List</h1>
</header>
<section class="conteudo">
<article>
<input type="text" class="input-new-item" placeholder="New Item"/>
<button type="buttom" name="button" class="add-new-item">+</button>
</article>
<article>
</article>
</section>
</main>
<script>
var buttom = document.getElementsByClassName('add-new-item');
var input;
buttom[0].onclick = function() {
input = document.getElementsByClassName('input-new-item');
console.log(input[0].value);
};
</script>
</body>
</html>