multiselect2side:jQuery多重選擇清單方塊外掛程式

來源:互聯網
上載者:User

標籤:

http://blog.csdn.net/rosanu_blog/article/details/8550723

 

http://www.bkjia.com/jQuery/449193.html

 

 <!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" /><meta name="keywords" content="多重選擇清單方塊,jquery外掛程式" /><meta name="description" content="Helloweba示範平台,示範XHTML、CSS、jquery、PHP案例和樣本" /><title>操作多重選擇清單方塊</title><link rel="stylesheet" type="text/css" href="jquery.multiselect2side.css" /><style type="text/css">    .demo2{width:600px; margin:40px auto; color:#424242; background:#fff}</style><script type="text/javascript" src="jquery-1.10.1.min.js"></script><script type="text/javascript" src="jquery-migrate-1.2.1.min.js"></script><script type="text/javascript" src="jquery.multiselect2side.js"></script><script type="text/javascript">$(function(){   $("#liOption").multiselect2side({        selectedPosition: ‘right‘,        moveOptions: true,        labelsx: ‘待選區‘,        labeldx: ‘已選區‘   });});</script></head><body><div id="main">    <form id="sel_form" action="posts.php" method="post">     <div id="sel">      <select name="abc" id=‘liOption‘ multiple=‘multiple‘ size=‘8‘ >        <option value="PHP">PHP</option>        <option value="MYSQL">MYSQL</option>        <option value="ASP.NET">ASP.NET</option>        <option value="XHTML">XHTML</option>        <option value="CSS">CSS</option>        <option value="JQUERY">JQUERY</option>      </select>     </div>     <input type="submit" class="btn" value="提 交" />     </form></div><!--<p id="stat"><script type="text/javascript" src="http://js.tongji.linezing.com/1870888/tongji.js"></script></p>--></body></html>

1.使用了1.9以上版本的jQuery時,jquery.multiselect2side.js會在執行時報如下錯誤:

jquery.multiselect2side.js:106 Uncaught TypeError: Cannot read property ‘msie‘ of undefined。

所以必須加上jquery-migrate-1.2.1.min.js,它負責1.9以上版本jQuery的相容問題。

2.查看頁面源碼會發現,右側select的name等於左側select的name加上ms2side__dx[],這個尾碼是自動加的。

multiselect2side:jQuery多重選擇清單方塊外掛程式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.