如何删除select option
除第二个值之外的每个元素的option
值:
<select name="_users_id_requester" onchange="submit()">
<option value="0">-----</option>
<option selected="" value="774">Asmaa El Habib,Yassine</option>//except this one
<option value="779" title="Ahlam Edouiri - U8K8O">Ahlam Edouiri</option>
<option value="746" title="Ainane Mohamed - MohamedAinane">Ainane Mohamed</option>
</select>
我尝试过这样的事情,但我不知道如何结束它:
$("select[name='_users_id_requester']").each(function(){
if ( $(this).index() > ..... )
$(this).attr("value", " ");
});