Skip to content

Commit

Permalink
jsonrayssonelyara
Browse files Browse the repository at this point in the history
  • Loading branch information
R7zx committed Jun 20, 2022
1 parent b808bcf commit 750feed
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions dom.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,40 @@
<!DOCTYPE html>
<html lang="pt-br">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
/* body {
background-color: rgb(50, 45, 113);
color: rgb(0, 0, 0);
}
} */
</style>
<title>Aula sobre DOM</title>
</head>

<body>
<h1>JS</h1>
<p id="result">Resultado 1</p>
<p></p>
<div>Teste DIV</div>
</body>
</html>
<h1>Verificação de idade</h1>

<script>
//----------------------------------------------------------//
let divIdade = window.document.getElementsByTagName("div")[0]
<script>


if (idade<=18) {
document.body.style.background = "black";
document.body.style.color
} else {
// const result = document.querySelector("<p>")
var idade = prompt("digite sua idade");

}

//chamada da função, (não terminado, tera que ser passado dnv)
if (idade >= 18) {
document.body.style.background = "black";
document.body.style.color = "silver";
document.write("você é maior de idade");
} else {
(idade <18)
document.body.style.background = "red";
document.body.style.color = "white";
document.write("você é menor de idade");

}

</script>
</body>

</script>
</html>

0 comments on commit 750feed

Please sign in to comment.