Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions execs1/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
let titulo = document.querySelector('h1')
titulo.innerHTML = 'Hora do Desafio'

function mostrarMensagem(){
console.log("O botão foi clicado")
}

function mostrarAlerta(){
alert('Eu amo JS.')
}

function mostrarPrompt(){
let nomeCidade = prompt('Digite o nome de uma cidade do Brasil: ');
alert(`Estive em ${nomeCidade} e me lembrei de você.`)
}

function somar(){
let num1 = parseInt(prompt('Digite um numero interio para soma: '));
let num2 = parseInt(prompt('Digite outro número inteiro para soma: '));
alert(`${num1} + ${num2} = ${num1 + num2}`)
}
22 changes: 22 additions & 0 deletions execs1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<header>
<h1></h1>
</header>
<main class="container">
<button onclick="mostrarMensagem()" class="button">Console</button>
<button onclick="mostrarAlerta()" class="button">Alert</button>
<button onclick="mostrarPrompt()" class="button">Prompt</button>
<button onclick="somar()" class="button">Soma</button>
</main>

<script src="app.js"></script>
</body>
</html>
35 changes: 35 additions & 0 deletions execs1/script.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
header {
text-align: center;
font-size: 30px;
color: #279EFF;
}

main, html {
margin: 0;
padding: 0;
height: 50%;
display: flex;
justify-content: center;
align-items: center;
background-color: #0C356A;
}

.container {
text-align: center;
color: #279EFF;
}

.button {
padding: 10px 20px;
margin: 10px;
font-size: 24px;
border: none;
background-color: #3498db;
cursor: pointer;
border-radius: 5px;
}

.button:hover {
background-color: #2980b9;
}