querySelectorAll doesn't select select boxes with name

I have a form that has multiple select boxes and inputs with a array like name. So I have multiple select boxes with a name personrooms. I would like to get these using this

var personroom=document.querySelectorAll("input[name='personsroom[]']");


it gives me null (“0”). But with the same way I can select all input (text) fields. Strange. Can anyone help me? Thanks beforehand

var personroom=document.querySelectorAll("input[name='personroom[]']");

no. name is correct as i wrote.

<select class="form-control" name="personsroom[]">
                                                    @foreach($yers as $val)
                                                        <option value="{!! $val->id !!}">{!! $val->name !!}</option>

<select> != <input>


Thank you very much. i understood

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.