...

View Full Version : Creaing an item in a dropdown list



dep
12-29-2005, 08:29 PM
How can I use DOM to create an item in a dropdown list?

<select id="dropdown">
<option value="1">item 1</option>
<option value="2">item 2</option>
<option value="3">item 3</option>
</select>

say I wanted to add an item to the start/end?

dep

nikkiH
12-29-2005, 09:58 PM
See createElement() and appendChild().



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum