<html>
<head>
<script type="text/javascript">
function EE(obj)
{
alert("value:"+obj.value+" name:"+obj.options[obj.selectedIndex].text);
}
function test()
{
var selects = document.getElementById("selecttest");
selects.options.length=0;//清空.
selects.remove(2);//根据下标删除特定项.
selects.options[2].selected = true;//特定项变成选中项。
var new_option = new Option(select_txt,select_value);
selects.options.add(new_option);//新增一项
}
</script>
</head>
<body>
<select name="selecttest" onchange="EE(this)">
<option value="1">第一项</option>
<option value="2">第二项</option>
<option value="3">第三项</option>
</html>