0
Because he can’t read the property?
objetoSelecionado = document.selectForm.variosDias;
<form name="selectForm">
<select name="variosDias" multiple>
<option value="Domingo">Domingo</option>
<option value="Segunda">Segunda-feira</option>
<option value="Terça">Terça-feira</option>
<option value="Quarta">Quarta-feira</option>
<option value="Quinta">Quinta-feira</option>
<option value="Sexta">Sexta-feira</option>
<option value="Sábado">Sábado</option>
</select>
<input type="button" value="Enviar" onclick="">
</form>
Error appears:
Uncaught Typeerror: Cannot read Property 'variosDias' of Undefined
What do you want to read exactly? the selected value or the DOM?
– JuniorNunes
the DOM, I wanted to know where the Error is
– user106463
What error is appearing to you? Here is working normally...
– JuniorNunes
Uncaught Typeerror: Cannot read Property 'variosDias' of Undefined
– user106463
I’ll create an answer with an example for you to see how it works.
– JuniorNunes