代码
            var $btnUp = $('#ChooseUserControl1_btnUp');
            var $btnDown 
= $('#ChooseUserControl1_btnDown');
            
            
            
            
//选择的联系人上下移动///////////////////////////////////
            $btnUp.click(function()
            {
                $lbSelLinkMan.find(
'option:selected').each(function(index, item)
                {         
                    ListBox_Order(
'up'); 
                });
                
return false;
            });
            $btnDown.click(function()
            {
                $lbSelLinkMan.find(
'option:selected').each(function(index, item)
                {
                    ListBox_Order(
'down');
                });
                
return false;
            });
            function ListBox_Order(action)
            {                
                var size 
= $lbSelLinkMan.find('option').size();
                var selsize 
= $lbSelLinkMan.find('option:selected').size();
                
                
if (size > 0 && selsize > 0)
                {                    
                    $lbSelLinkMan.find(
'option:selected').each(function(index, item)
                    {
                        
if (action == "up")
                        {
                            $(item).prev().insertAfter($(item));
                            
return false;
                        }
                        
else if (action == "down")//down时选中多个连靠则操作没效果
                        {
                            $(item).next().insertBefore($(item));
                            
return false;
                        }
                    })
                }
                
return false;
            }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-07-21
  • 2021-12-21
猜你喜欢
  • 2022-01-12
  • 2021-11-02
  • 2021-10-18
  • 2022-01-07
  • 2021-10-19
  • 2022-12-23
  • 2021-09-20
相关资源
相似解决方案