且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jQuery 从下拉列表中删除一个选项,给定选项的文本/值

更新时间:2023-11-30 07:51:03

$("option[value='foo']").remove();

或更好(如果页面中的选择很少):

or better (if you have few selects in the page):

$("#select_id option[value='foo']").remove();