js select 隐藏option

<body onload="document.getElementsByTagName('OPTION')[2].outerHTML=''">
<SELECT name="d_source" length=2>
<OPTION value=www.51js.com selected>www.51js.com</OPTION>
<OPTION value=www.ccbfu.com>www.ccbfu.com</OPTION>
<OPTION value="我会隐藏">我被隐藏了</OPTION>

</SELECT>

你可能感兴趣的:(select)