Last active
December 22, 2015 23:09
-
-
Save diessica/6545115 to your computer and use it in GitHub Desktop.
A simple help to topic https://www.facebook.com/groups/javascriptbrasil/permalink/511054952319536/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function verificar() { | |
var dados = document.getElementById("dados"), | |
t1 = document.getElementById("t1").value, | |
t2 = document.getElementById("t2").value, | |
t3 = document.getElementById("t3").value; | |
if (t1 == t2 && t2 == t3 && t1 == t3) { | |
dados.triangulo.value = "Isosceles"; | |
} | |
else if (t1 == t2 || t2 == t3) { | |
dados.triangulo.value = "Equilatero"; | |
} | |
else { | |
dados.triangulo.value = "escaleno"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment