下面的例子为一个双击下拉框内容移动效果的演示
& lt; !DOCTYPE html比; & lt; head> & lt;元http-equiv=? type”内容=" text/html;utf - 8字符集="/比; & lt;脚本src=" https://www.yisu.com/zixun/jquery-1.4.2.min.js " type=" text/javascript祝辞& lt;/script> & lt;链接的href=" https://www.yisu.com/zixun/reset.css " type=" text/css " rel="样式表"/比; & lt;脚本语言=癹avascript”比; $(函数(){//双击向右移动 $ (" # select1 ") .dblclick(函数(){ $ (" # select1选项:选择").appendTo (“# select2”); })//双击向左移动 $ (" # select2 ") .dblclick(函数(){ $ (" # select2选项:选择").appendTo (“# select1”); })//全部向右 $ (" # moveallright ") .click(函数(){ $ (" # select1选项”).appendTo (“# select2”); })//全部向左 $ (" # moveallleft ") .click(函数(){ $ (" # select2选项”).appendTo (“# select1”); })//选中的向右 $ (" # moveright ") .click(函数(){ $ (" # select1选项:选择").appendTo (“# select2”); })//选中的向左 $ (" # moveleft ") .click(函数(){ $ (" # select2选项:选择").appendTo (“# select1”); }) }); & lt;/script> & lt; style> *{字体大小:18 px;} 选择{宽度:116 px;} .div1{宽度:400 px;浮:左;text-align:权利;} .div2{宽度:400 px;浮:左;text-align:左;margin-left: 50 px;} 选择,按钮{边界:1 px固体# CCC} & lt;/style> & lt; title>双击下拉框内容移动& lt;/title> & lt;/head> & lt; body> & lt; div类=癲iv1”比; & lt;选择id=皊elect1”多个==?0”比“多个”大小; & lt;选项值=" https://www.yisu.com/zixun/1 "祝辞选项一& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/2 "祝辞选项二& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/3 "祝辞选项三& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/4 "祝辞选项四& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/5 "祝辞选项五& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/6 "祝辞选项六& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/7 "祝辞选项七& lt;/option> & lt;选项值=" https://www.yisu.com/zixun/8 "祝辞选项八& lt;/option> & lt;/select> & lt; br/比; & lt;按钮id=癿overight”在向右移动,gt;和gt; & lt;/button> & lt; br/比; & lt;按钮id=" moveallright "祝辞全部向右,gt;和gt; & lt;/button> & lt; br/比; & lt;/div> & lt; div类=癲iv2”比; & lt;选择id=皊elect2”多个==?0”比“多个”大小; & lt;选项值=" https://www.yisu.com/zixun/9 "祝辞选项九& lt;/option> & lt;/select> & lt; br/比; & lt;按钮id=" moveleft "祝辞,lt;, lt;向左移动& lt;/button> & lt; br/比; & lt;按钮id=" moveallleft "祝辞,lt;, lt;全部向左& lt;/button> & lt; br/比; & lt;/div> & lt;/body> & lt;/html>