Hi,

I am new to JavaScript and hope you can help me with this.

I would like to copy the option values from select on another like when a user clicks on a button:

Select 1:
<select>
<option value="red">red</option>
<option value="green">green</option>
<option value="blue">blue</option>
</select>

Select 2:
<select>
</select>

How can I manage that when the clicked all options from Select 1 are copied to Select 2 so that in the end both dropdowns show the same options ? Ideally using JavaScript (not jQuery) for this one.

Many thanks in advance for any help with this.

Thanks, Tim