通过符号左右移动数据easyui

<!-- 关联客户窗口 -->
< div modal= "true" class= "easyui-window" title= "关联客户窗口" id= "customerWindow" collapsible= "false" closed= "true" minimizable= "false" maximizable= "false" style= "top: 20 px ;left: 200 px ;width: 400 px ;height: 300 px ; " >
   < div style= "overflow: auto ;padding: 5 px ; " border= "false" >
      < form id= "customerForm" action= "../../fixedAreaAction_assignCustomers2FixedArea.action" method= "post" >
         < table class= "table-edit" width= "80%" align= "center" >

            < tr class= "title" >
               < td colspan= "3" >关联客户 </ td >
            </ tr >
            < tr >
               < td >
                  < input type= "hidden" name= "id" id= "customerFixedAreaId" />
                  < select id= "noassociationSelect" multiple= "multiple" size= "10" >
                  </ select >
               </ td >
               < td >
                  < input type= "button" value= "》》" id= "toRight" >
                  < br />
                  < input type= "button" value= "《《" id= "toLeft" >
                  < script type= "text/javascript" >
                     $ ( function () {
                        //为上面两个按钮绑定事件,实现左右移动客户数据效果
                        $ ( "#toRight" ) . click ( function () {
                           $ ( "#associationSelect" ) . append ( $ ( "#noassociationSelect option :selected" )) ;
                        } ) ;
                        $ ( "#toLeft" ) . click ( function () {
                           $ ( "#noassociationSelect" ) . append ( $ ( "#associationSelect option :selected" )) ;
                        } ) ;
                       
                        $ ( "#associationBtn" ) . click ( function () {
                           //获取当前选中的定区id
                           //获得数据表格所有选中的行
                           var rows = $ ( "#grid" ) .datagrid ( "getSelections" ) ;
                           var id = rows [ 0 ] .id ;
                           $ ( "#customerFixedAreaId" ) .val (id ) ;
                           //提交表单之前需要选中所有的关联客户option
                           $ ( "#associationSelect option " ) .attr ( "selected" , "selected" ) ;
                           $ ( "#customerForm" ) .submit () ;
                        } ) ;
                     } ) ;
                  </ script >
               </ td >
               < td >
                  < select id= "associationSelect" name= "customerIds" multiple= "multiple" size= "10" ></ select >
               </ td >
            </ tr >
            < tr >
               < td colspan= "3" >< a id= "associationBtn" href= "#" class= "easyui-linkbutton" data-options= "iconCls:'icon-save'" >关联客户 </ a > </ td >
            </ tr >
         </ table >
      </ form >
   </ div >
</ div >
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值