日期:2014-05-16  浏览次数:20366 次

javaScript 给Select添加项
<script language="javascript" type="text/javascript">
   var option1=new Option("one","one");
   var option2=new Option("two","two",true);
   var option5=new Option("three","three",false,true)
   document.getElementById("id").options[0]=option1;
   document.getElementById("id").options[1]=option1;
   document.getElementById("id").options[2]=option1;
   document.myForm.like.options[6]=new Option("four","four");
</script>