Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
435 views
in Technique[技术] by (71.8m points)

javascript - Copying selected option to another select

I would like to copy the user-selected option from one "select" to another "select". I want to do this because I cannot edit the first "select" but I need the information from it.

The first select has an Id of "product-select-option-1". This is the second select:

 <label for="Material">Material</label>
   <select id="Material" name="attributes[Material]" size="1">    
    <option value=" " selected="selected">Choose your Material</option>
    <option value="0">Cotton</option>
    <option value="1">Silk</option>
    <option value="2">Tafetta</option>
    <option value="3">Chiffon</option>
   </select>

Any help would be massively appreciated! Thank you!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...