Doubts with select array [duplicate]

2

I do not have much knowledge in javascript, I would like to know if it is possible, when changing a main select, to update the others to select the same information from that main.

Example: I'll choose the primary currency of a form of payment. When selecting it, I would like the X installments below to be updated to also select the same currency:

<label>Moeda Principal</label>
<select id='principal' onchange='atualizar()'>
    <option value="1">Dinheiro</option>
    <option value="2">Cheque</option>
</select>

<label>Parcela 1</label>
<select name='parcela[]'>
    <option value="1">Dinheiro</option>
    <option value="2">Cheque</option>
</select>

<label>Parcela 2</label>
<select name='parcela[]'>
    <option value="1">Dinheiro</option>
    <option value="2">Cheque</option>
</select>

Is it possible? Thank you in advance!

    
asked by anonymous 24.08.2017 / 16:20

0 answers