标签:http javascrip option 选择 col back jquery ack 引入
官方项目地址: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>
标签:http javascrip option 选择 col back jquery ack 引入
原文地址:https://www.cnblogs.com/pxblog/p/12982929.html