js(JQuery)引入select2
作者:互联网
官方项目地址:https://select2.org/
引入css和js
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.min.js"></script> <!-- select2 -->
使用
<select id="school" name="school" > <option value="小学">小学</option> </select> <script type="text/javascript"> $('#school').select2({ placeholder: '请选择学校' }); </script>
标签:JQuery,school,js,https,引入,select2 来源: https://www.cnblogs.com/pxblog/p/12982929.html