//主要功能实现
<script>
//添加按钮功能实现
function add(){
//获取input文本输入狂标签
var txt = document.getElementById("txt");
//新建一个option
var o = new Option();
//将文本框输入的内容赋给option显示的内容
o.text = txt.value;
var se = document.getElementById("s1");
//把新建的option添加进来
se.add(o);
}
//移除按钮功能实现
function remove(){
//获取select标签
var se = document.getElementById("s1");
//移除当前选中项
se.remove(se.selectedIndex);
}
</script>
</html>