对于列表框,如何选中一项后点击外面的按钮将其从列表删除,同时得到选中的项的字符串,再有就是从文本框将

对于列表框,如何选中一项后点击外面的按钮将其从列表删除,同时得到选中的项的字符串,再有就是从文本框将字符串加入到列表框中?
---------------------------------------------------------------

1<select name="s">
2<option>1   
3<option>2   
4<option>3   
5</option></option></option></select>
1<input onclick="if(s.selectedIndex&gt;=0)s.remove(s.selectedIndex++)" type="button" value="delSelected"/>
1<input onclick="s[s.length++].text=new Date()" type="button" value="addItem"/>
Published At
Categories with Web编程
comments powered by Disqus