天天看點

Select2異步加載的使用

select2官網下載下傳位址:https://github.com/select2/select2

效果圖:

Select2異步加載的使用
Select2異步加載的使用

1、html中引入必要檔案

<link href="../plugins/select2/css/select2.min.css" target="_blank" rel="external nofollow"  rel="stylesheet" />
<script src="../plugins/jQuery/jquery.min.js"></script>
<script src="../plugins/select2/js/select2.min.js"></script>
           

2、html中定義Select标簽

繼續閱讀