-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.html
161 lines (114 loc) · 3.63 KB
/
home.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="PT-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Curso Javascript</title>
<script src="./introCodigo.js"></script>
<style>
#res{
margin-top: 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 20pt;
}
h1{
color: darkblue;
}
p{
color: cornsilk;
font-size: large;
font-style: oblique;
font-family:Verdana, Geneva, Tahoma, sans-serif
}
body{
font-family: Helvetica, Arial, sans-serif;
background-color: rgb(75, 76, 128);
}
h2{
color: crimson;
}
#post {
color: blueviolet;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
#img {
height: 300px;
display:inline-block
}
#bt, #bt2{
font-size: 16px;
padding: 10px 16px;
margin-bottom: 32px;
background-color: rgb(74, 144, 226);
color: rgb(255, 255, 255);
border: 0;
cursor: pointer;
}
#rod{
font: normal 20pt Arial;
background-color: blueviolet;
width: 200px;
height: 200px;
text-align: center;
line-height: 200px;
border-radius: 20px;
}
</style>
</head>
<body>
<button id="bt"> Click Aqui ! </button>
<button id="bt2"> Click Aqui bt2 ! </button>
<h1 id='post'>Titulo</h1>
<h2> Olá mundo</h2>
<h2> Somando valores!</h2>
<input type="number" name="n1" id="n1">
+
<input type="number" name="n2" id="n2">
<input type="button" value="somar" onclick="somar()"
>
<div id="res"> Resultado </div>
<p>Paragarasdasd ,, asud hasudh asd as asudh asuhdaisfafi</p>
<h2>Olá marte</h2>
<p>Olá marte vermelha</p>
<div id="rod" onclick="mudar()" onmouseover="cima()" onmouseleave="saiu()" >
Olá!
</div>
<script>
function somar(){
let n1 = Number( document.getElementById("n1").value)
let n2 = Number( document.getElementById("n2").value)
let res = document.getElementById("res")
res.innerHTML = `A soma de ${n1} + ${n2} é: <strong>${n1 + n2}</strong>`
}
function saiu(){
let a = document.getElementById("rod")
a.innerText = "saiu!"
}
function cima(){
let a = document.getElementById("rod")
a.innerText = "cima!"
}
function mudar(){
let a = document.getElementById("rod")
a.innerText = "Clicou!"
}
document.getElementById('post').textContent = 'Rodrigo Adriano'
let bt = document.getElementById('bt');
bt.addEventListener('click', () => {
let big = document.getElementById('post')
big.textContent = "Maneiro!"
document.getElementById('img').src = pic2
})
let pic1 = './supoermax.PNG'
let pic2 = './small_04.jpg'
let imagem = document.getElementById('img')
let novobt = document.getElementById('bt2')
novobt.addEventListener('click', () =>{
novobt.textContent = "Clicou"
let ind = document.createElement('img')
ind.src = './small_04.jpg'
document.body.appendChild(ind)
})
</script>
</body>
</html>