<script language="
javascript">
/**
* 添加并选中select中的option
* Edit www.jb200.com
* at 2013/5/10
*/
function addOptionToSelect()
{
var slt=document.getElementById("slt");
var objOption=document.createElement("OPTION");
objOption.value='6';
objOption.text='content';
slt.add(objOption);
alert(slt.options.length);
slt.options[slt.options.length-1].selected='selected';
}
function getvalue()
{
var slt=document.getElementById("slt");
alert(slt.value);
}
</script>