0
Why is there a need to hide elements ?
2 Réponses
+ 2
example: when inserting a correct e-mail in a form with JavaScript DOM, the div "error" is default hidden, but if there's a wrong e-mail, JavaScript DOM will change the element's visibility ans show the error.
0
For example, I set my first select option to display none, so when the user clicks on the select, the first option won't be shown and force the user to select one of the other options.
Let's say my first option display the text "select an option", this is not a right option for the webpage, when user clicks the select, this "select an option" option, won't be shown
<option style = 'display : none' >
Select an option
<option>
and the user can't select this option.