且构网

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

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

更新时间:2023-11-29 23:47:22

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

或更好(如果您在页面中几个选择):

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

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