js、jq实现select 下拉选择更多

<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta content="width=device-width, initial-scale=1"> <title>jQuery ySelect Plugin Demo</title> <!--图标和默认样式--> <link type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css"> <link type="text/css" href="http://cdn.bootcss.com/font-awesome/4.6.0/css/font-awesome.min.css"> <!--核心样式--> <link href="http://www.likecs.com/css/ySelect.css" type="text/css"> <script src="http://www.likecs.com/js/jquery.js"></script> <script src="http://www.likecs.com/js/bootstrap.min.js"></script> </head> <body> <select multiple="multiple"> <option value="1">加多宝凉茶</option> <option value="2">饮料</option> <option value="3">太太乐鸡精</option> <option value="4">嘉士伯啤酒</option> <option value="5">成功图像类型</option> <option value="6">门店类型</option> <option value="7">终端类型</option> </select> </body> <script src="http://www.likecs.com/js/ySelect.js"></script> <script> $(function() { $('#m1').ySelect({ placeholder: '请先选择一些项目', // searchText: '搜索', showSearch: false, numDisplayed: 4, overflowText: '已选中 {n}项', isCheck: false }); $("#m1").ySelectedValues(",") }); </script> </html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpzjsf.html