2017-03-23 40 views

回答

1
- Retrieve select box information from database 
- add to the option 
- add select 2 library to your page 

- give a class to select box so that you can refer in JavaScript 

- then add below code 
<script type="text/javascript"> $(class name of select box).select2(); </script> 

參考: - https://select2.github.io