Skip to content

Commit

Permalink
json_raysson_lyara
Browse files Browse the repository at this point in the history
  • Loading branch information
R7zx committed Jun 20, 2022
1 parent 750feed commit e19d1b3
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
36 changes: 36 additions & 0 deletions calculadoracomhtml.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!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">
<title>calculadora shernows</title>
</head>
<body>

</body>
</html>
<script>


let a
let b
let resultado;
let operacao = "soma";

switch (operacao) {
case "soma":
resultado = a+b;
break;
case "subtracao":
resultado = a-b;
break;
case "multiplicao":
resultado = a*b;
break;
case "divisao":
resultado = a/b;
default:
break;
}
</script>
30 changes: 30 additions & 0 deletions evento.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<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>
#container {
background-color: blue;
color: white;
width: 100%;
line-height: 70px;
height: 70px;
text-align: center;

}
</style>
<title>Eventos teste</title>

</head>

<body>

<div id="container">
ol
</div>
<h1>JS</h1>

</body>
</html>
44 changes: 44 additions & 0 deletions soma.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!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">
<title>exercicios</title>
</head>

<body>
<div>
<input id="a" type="number" placeholder="digite um numero">
<input id="b" type="number" placeholder="digite um numero">
<input id="soma" type="button" name="somar" onclick="clicar()">
</div>
<div id="resp">resposta:</div>
</body>

</html>
<script>


function clicar() {
var resp = document.getElementById("resp")
var num1 = document.getElementById('a')
var num2 = document.getElementById('b')
var input1 = Number(num1.value)
var input2 = Number(num2.value)
// console.log(input2);
resp = input1 + input2;
document.getElementById('resp').innerText = resp
}

// function somar() {
// let num1 = document.getElementById("input1")
// let num2 = document.getElementById("input2")
// let result = 0;
// let n1 = Number(num1.value);
// let n2 = Number(num2.value);
// result = n1 + n2;
// document.getElementById("result").innerText = ` O resultado da soma entre ${n1} e ${n2} é: ${result} `;
// }
</script>

0 comments on commit e19d1b3

Please sign in to comment.