JQuery: Create n selects after choosing it in the select box

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-12-27T11:56:12Z Indexed on 2010/12/27 12:53 UTC
Read the original article Hit count: 179

Filed under:
|

I have this select:

<select name="main">
<option value="2">2s</option>
<option value="3">3s</option>
<option value="5">5s</option>
</select>

How do I make, that after choosing 2s, 2 selects would be created:

<select name="select1">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<select name="select2">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
</select>

After choosing 3s, it would create 3 selects and so on. Thanks

Would appreciate jsfiddle example

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html