- 1
Input form validation JS
Hi, everyone! I need your help please! Something wrong with my code of validation form js. The first input email is almost working except the second error message (email invalid). The problem is when I test password input, doesn't work anything including email input. And how to check checkbox input? Is (checkboxValue === false) right ? https://code.sololearn.com/W62xfOugew4j/?ref=app
2 Antworten
+ 3
Elena , first use window.onload in JS to load the whole html. To check if the checkbox is checked, use "checked" property which is a boolean.
+ 1
The problem is at line 49 50
With querySelector you are always getting the first match. You should use the first argument to find the right target to style/display.
https://code.sololearn.com/W55e103mw93L/?ref=app