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

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
D
Docker
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
美团技术团队
V
V2EX
Last Week in AI
Last Week in AI
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
Microsoft Azure Blog
Microsoft Azure Blog
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
B
Blog RSS Feed
博客园_首页
B
Blog
博客园 - 叶小钗
I
InfoQ
WordPress大学
WordPress大学
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
The Register - Security
The Register - Security
MyScale Blog
MyScale Blog
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
Latest news
Latest news
W
WeLiveSecurity
T
The Exploit Database - CXSecurity.com
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
CERT Recently Published Vulnerability Notes
C
CXSECURITY Database RSS Feed - CXSecurity.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
N
News and Events Feed by Topic
S
Secure Thoughts
The Hacker News
The Hacker News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News

博客园 - 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>