Posts by italofsan • 1 point
1 post
-
0
votes3
answers82
viewsA: How do I use Javascript to check if my input has any written text?
Simpler yet: if (!email_box.value) { return console.log("Campo vazio!") } Empty fields are false in Javascript. If you do a check by placing only the value on if: if (valor) { // faça alguma coisa }…