<html> <head> <title>option test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <input type="radio" name="rd" onclick="change(1)">11 <input type="radio" name="rd" onclick="change(2)">22 <select name='change'> <option value="" >请选择</option> <option value="1" id="op1">1</option> <option value="2" id="op2">2</option> <option value="3" id="op3">3</option> <option value="4" id="op4">4</option> </select> <mce:script type="text/javascript"><!-- function change(id){ var chg=document.getElementById("change"); if(id==1){ chg.length=1;//清空OPTION //动态添加OPTION chg.options.add(new Option("第一项","1"));//左边显示,右边为值; }else{ //从后一个个删除OPTION chg.remove(4); chg.remove(3); chg.remove(2); chg.remove(1); chg.options.add(new Option("测试项","123"),2);//2表示插入第几行 } } // --></mce:script> </body> </html>