Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 002033d

Browse files
committed
script responsible for checking the value entered by the user.
1 parent 8bbfb35 commit 002033d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

‎script.js‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
function checkValue(){
2+
var numero = document.getElementById('valorNum').value;
3+
4+
if (numero < 10) {
5+
window.alert('Insuficiente | Insufficient');
6+
}
7+
8+
else if(numero < 14){
9+
window.alert('Bom | Good');
10+
}
11+
12+
else if(numero >= 14){
13+
window.alert('Muito Bom | Very Good');
14+
}
15+
16+
else{
17+
window.alert('Valor Informado Inválido! | Invalid Informed Value');
18+
}
19+
20+
printTableVal();
21+
}
22+
23+
function printTableVal(){
24+
var valores = "Entre 0 e 10, 10 excluído, mostra "Insuficiente" "+
25+
"<br> Entre 10 e 14, 14 excluído, mostra "Bom" "+
26+
"<br> Maior que 14, mostra "Muito Bom" ";
27+
28+
document.getElementById("evaluative_table").innerHTML = valores;
29+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /