利用Jquery实现可多选的下拉框
首先下载jquery.multiselect.js 的插件然后复制下列代码,只需改下路径就可以实现可多选下拉框。如果好用还请多多支持!
代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> <!-- body { margin-left: 5px; margin-top: 5px; margin-right: 5px; margin-bottom: 5px; } --> </style> <script type="text/javascript" src="jquery.js"></script> <link rel="stylesheet" type="text/css" href="jquery-ui.css" /> <script type="text/javascript" src="jquery-ui.min.js"></script> <script type="text/javascript" src="jquery.multiselect.js"></script> <link rel="stylesheet" type="text/css" href="jquery.multiselect.css" /> <script type="text/javascript"> $(function(){ $("#company").multiselect(); }); </script> </head> <body> <table align="center"> <tr> <td height="49"><select name="company" id="company"> <option value="北方公司" selected="selected">北方公司【总公司】</option> <option value="西南公司">西南公司</option> </select><span id="company1" style="color:#FF0000"></span></td> <td align="left"> </td> </tr> </table> </body> </html>
相关推荐
EdwardSiCong 2020-11-23
85477104 2020-11-17
hhanbj 2020-11-17
81427005 2020-11-11
seoppt 2020-09-13
honeyth 2020-09-13
WRITEFORSHARE 2020-09-13
84483065 2020-09-11
momode 2020-09-11
85477104 2020-08-15
83510998 2020-08-08
82550495 2020-08-03
tthappyer 2020-08-03
84901334 2020-07-28
tthappyer 2020-07-25
TONIYH 2020-07-22
tztzyzyz 2020-07-20
83510998 2020-07-18
81463166 2020-07-17