How to dynamic filter options of <select > with jQuery?

前端 未结 12 617
轮回少年
轮回少年 2020-11-29 18:54



        
12条回答
  •  心在旅途
    2020-11-29 19:24

    This is a simple solution where you clone the lists options and keep them in an object for recovery later. The scripts cleans out the list and add only the options that contains the input text. This should also work cross browser. I got some help from this post: https://stackoverflow.com/a/5748709/542141

    Html

    
    
                            
        
    提交评论

提交回复
热议问题