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

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Schneier on Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Latest news
Latest news
H
Help Net Security
雷峰网
雷峰网
Spread Privacy
Spread Privacy
Cyberwarzone
Cyberwarzone
Project Zero
Project Zero
Security Latest
Security Latest
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
P
Privacy & Cybersecurity Law Blog
M
MIT News - Artificial intelligence
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Proofpoint News Feed
U
Unit 42
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
S
Securelist
S
Security @ Cisco Blogs
T
Threatpost
P
Palo Alto Networks Blog
C
Check Point Blog
V
Vulnerabilities – Threatpost
T
Tailwind CSS Blog
B
Blog RSS Feed
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
P
Proofpoint News Feed
P
Privacy International News Feed
AWS News Blog
AWS News Blog
博客园 - 叶小钗
WordPress大学
WordPress大学

博客园 - sun@live

两段代码 <收藏>提高Web性能的14条法则(详细版) MOSS与业务系统的集成 之 单点登录 MOSS与业务系统的集成 之 自定义Membership实现Forms方式验证 手机归属地数据—采集 .Net数据源自定义参数 JavaScript和CSS速查手册 序列化一个字符串到CDATA元素(.NET 1.1) Sandcastle工具SandcastleBuilder 清除字符串数组中,重复元素 - sun@live - 博客园 Windows Live Writer 论坛中,用户权限解决方法 (原创)一个改自java的代码统计工具 Web2.0用户注册,激活,密码找回模块 [学习日志]EyasBlog控件部分已基本完成-2005-12-03 学习日志(blog日历控件)-2005年11月12日 学习日志(Blog架构)-2005年11月09日 学习日志-2005年11月09日 学习计划-2005年11月07日
写的一个双向选择器(JS)
sun@live · 2006-06-04 · via 博客园 - sun@live

<!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=gb2312" />
    
<title>Web双向选择器</title>

<script type="text/javascript" language="javascript">
   
function moveItem(dest, source)
   
{
        
var dest   = ( typeof dest == "string" ? document.getElementById(dest): dest );
        
var source = ( typeof source  == "string" ? document.getElementById(source) : source );

        
if( source.tagName.toLowerCase() != "select" || dest.tagName.toLowerCase() != "select" )
            
return;

        
for ( index=source.length - 1; index >= 0; index-- ) {
            
if ( source[index].selected ) {
                dest.length
++;                    
                dest[dest.length
-1].id    = source[index].id;
                dest[dest.length
-1].value = source[index].value;
                dest[dest.length
-1].text  = source[index].text;
                source[index] 
= null;
            }

        }

    }

</script>

<style type="text/css">

select
{
    margin
:-2px;
}

</style>
</head>
<body>
    
<table width="200" border="0" cellpadding="0" cellspacing="0">
        
<tr>
            
<td>
        
                
<select size="6" multiple="multiple" id="left" ondblclick="moveItem(right,this)">
                    
<option value="def">ListItem1</option>
                    
<option value="abcd">ListItem2</option>
                
</select>

            
</td>
            
<td>

                
<input type="button" value=" > " name="btnRight" onclick="moveItem(right,left)" />
               
                
<input type="button" value=" < " onclick="moveItem(left,right)" id="btn" name="btnLeft" />

            
</td>
            
<td>
        
                
<select size="6" multiple="multiple" id="right" ondblclick="moveItem(left,this)">
                    
<option value="abc">ListItemm3</option>
                    
<option value="def">ListItem4</option>
                    
<option value="abcd">ListItem5</option>
                    
<option value="abc">ListItem6</option>
                    
<option value="def">ListItem7</option>
                    
<option value="abcd">ListItem8</option>
                
</select>
        
            
</td>
        
</tr>
    
</table>
</body>
</html>