87,918
社区成员
发帖
与我相关
我的任务
分享
<select id='a'>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<br>
<script>
function clean()
{
while (document.getElementById("a").options.length>0)
{
document.getElementById("a").options.remove(0);
}
}
</script>
<input type="button" value="clean" onclick="clean()"/>
osel.options.length = 0;