function clean()...{ var ss=document.getElementById("s") while(ss.childNodes.length>0)...{ ss.removeChild(ss.childNodes[0]); } } function bd()...{ var ss=document.getElementById("s") for(var i=0;i<100;i++)...{ op=document.createElement("option"); tx=document.createTextNode(i); op.setAttribute("value","h"+i); op.appendChild(tx); ss.appendChild(op); } } <body><input type="submit" name="Submit" value="提交" onclick="getInfo()"/><table id="show" width="800" style=" border-style:groove; border-style:dotted;" border="1"></table><form id="form1" name="form1" method="post" action=""> <p> <select name="s" id="s" onchange="alert(this.options[this.options.selectedIndex].value)"> <option value="1">1</option> <option value="1">1</option> <option value="21">1</option> <option value="1">1</option> <option value="qw">q</option> <option value="qw">qw</option> <option value="qw">qw</option> </select> </p> <p> <input type="button" name="Submit" value="clear" onclick="clean()"/> <input type="button" name="Submit" value="build" onclick="bd()" /> </p></form></body></html> 自己做的测试联系