惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
F
Fortinet All Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
Secure Thoughts
SecWiki News
SecWiki News
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Recorded Future
Recorded Future
Hacker News - Newest:
Hacker News - Newest: "LLM"
Webroot Blog
Webroot Blog
Cloudbric
Cloudbric
博客园 - 司徒正美
The Cloudflare Blog
W
WeLiveSecurity
T
Tailwind CSS Blog
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
Jina AI
Jina AI
MyScale Blog
MyScale Blog
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Project Zero
Project Zero
C
CXSECURITY Database RSS Feed - CXSecurity.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
Last Week in AI
Last Week in AI
G
GRAHAM CLULEY
C
Check Point Blog
P
Proofpoint News Feed
L
LINUX DO - 最新话题
博客园 - Franky
P
Proofpoint News Feed
T
Tor Project blog
S
Security @ Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
宝玉的分享
宝玉的分享
C
Cyber Attacks, Cyber Crime and Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
O
OpenAI News
小众软件
小众软件
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - Magicam

jquery easyui 扩展验证 vs2010 安装 Ajax Control Toolkit Backing up the tail mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法 WInform CMD command Mysql中的数据导入SQLServer2000 VS2010安装SP1后无法安装VS2010 SDK Vs2008调试Silverlight时,出现“未安装silverlight托管调试包” js 取时间代码 Sys.ArgumentOutOfRangeException: Value must be an integer 错误的原因 iframe - Magicam wia Kodak 扫描仪应用 winform - Magicam js实现: e.keycode详解 jquery 无法设置selected属性,未指明的错误 Mysql存储过程游标循环操作 Tif文件转换成GIF列表 - Magicam - 博客园 Visual Studio 2010 安装“deffactory.dat can not open” 的解决办法 - Magicam js 实现2列 div 自适应高度 - Magicam NetTiers模板属性说明 NHibernate配置引发的异常 - Magicam - 博客园
JQuery ListBox间移动和ListBox内上下移动
Magicam · 2010-09-03 · via 博客园 - Magicam

代码

            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;
            }