- select2 option adds a select all option in addition to some options.
`< select multiple= "" id= "busSelect" >
< option value= "- 1" data-select2-id= "2" > all < / option >
< option value= "227" data-select2-id= "10" > Mobile BU < / option >
< option value= "228" data-select2-id= "11" > computer BU < / option > < option value= "264" data-select2-id= "12" > Wechat Mobile QQ < / option >
< option value= "277" data-select2-id= "13" > first-level customer service < / option >
< / select
- option data is dynamic
demand:
- Select all, select other items, and click Filter to remove all options from the text box.
- Select other items, and then select all. Remove other items in the text box when you click Filter.
- structure diagram:
Select all first, then select other items, and remove all other items from the text box.
Select other items first, then select all, and remove other options from the text box.