好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

清空select标签中option选项的3种不同方式

方法一

代码如下:


document.getElementById("selectid").options.length = 0;

方法二

代码如下:


document.formName.selectName.options.length = 0;

方法三

代码如下:


document.getElementById("selectid").innerHTML = "";

查看更多关于清空select标签中option选项的3种不同方式的详细内容...

  阅读:44次