diff --git a/Aulas-HTML/exercicios/aula1/index.html b/Aulas-HTML/exercicios/aula1/index.html index 45c22c1..2d73e10 100644 --- a/Aulas-HTML/exercicios/aula1/index.html +++ b/Aulas-HTML/exercicios/aula1/index.html @@ -14,3 +14,19 @@ - Abrir um pull request para o repositório original (da Womakers) - Acompanhar o prazo e marcar a entrega no Classroom --> + + + + + + + Fernanda Broch + + + + + diff --git a/aulas-javascript/exercicios/aula2/index.html b/aulas-javascript/exercicios/aula2/index.html index e69de29..6f02001 100644 --- a/aulas-javascript/exercicios/aula2/index.html +++ b/aulas-javascript/exercicios/aula2/index.html @@ -0,0 +1,21 @@ + + + + + + + + Checar Números + + +
+ + + + + + +
+ + + \ No newline at end of file diff --git a/aulas-javascript/exercicios/aula2/script.js b/aulas-javascript/exercicios/aula2/script.js new file mode 100644 index 0000000..559357a --- /dev/null +++ b/aulas-javascript/exercicios/aula2/script.js @@ -0,0 +1,29 @@ +function saoDiferentes(){ + checkDiv() + let input1 = document.getElementById('number1').value + let input2 = document.getElementById('number2').value + if(input1 != input2){ + changeDiv('Os valores são diferentes', 'green') + }else{ + changeDiv('Não são diferentes','red') + } +} +function changeDiv(text, className){ + let div = document.createElement('div') + div.id='result' + div.innerText=text + div.classList.add(className) + document.body.append(div) +} + +function resetar(){ + document.getElementById('number1').value = '' + document.getElementById('number2').value = '' + checkDiv() +} + +function checkDiv(){ + if(null != document.getElementById('result')){ + document.getElementById('result').remove() + } +} \ No newline at end of file diff --git a/aulas-javascript/exercicios/aula2/style.css b/aulas-javascript/exercicios/aula2/style.css new file mode 100644 index 0000000..74e6a84 --- /dev/null +++ b/aulas-javascript/exercicios/aula2/style.css @@ -0,0 +1,6 @@ +.green{ + color: rgb(40, 172, 0); +} +.red{ + color: rgb(252, 0, 42); +} \ No newline at end of file