为了账号安全,请及时绑定邮箱和手机立即绑定

帮忙看看怎么不行

<!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=utf-8" />

<title>选择参加名单</title>

<style type="text/css">

ul{width:120px; height:200px; border:1px solid #000; list-style:none;padding:0px; margin:0px;}

div{margin:5px;}

table{width:80px; height:220px; float:left; height:250px; padding:0px;

margin:0px;}

td{text-align:center;}

input{width:50px;}

#all{height:300px; width:700px;}

#daixuan{width:120px; height:220px; float:left; height:250px; padding:0px;

margin:0px;} 

#canxuan{width:120px; height:220px; float:left; height:250px; padding:0px;

margin:0px;}

</style>


<script type="text/javascript">

function sel(){

var del=document.getElementById('dxdiv').childNodes 

for(var i=0;i<del.length;i++){

   del[i].onmouseover()=function addli(){

var text=del[i].innerHTML;

var add=document.getElementById('cxdiv').lastChild;

var newnode=document.createElement("li");

newnode.value=text;

add.appendChild(newnode);

del[i].parentNode.removeChild(del[i])

}

}

}

</script>

</head>

<body>

<div id="all">


<div id="daixuan">

<font size="+1">待选名单</font>

<ul id="dxdiv">

<li>王伟</li>

    <li>李佳</li>

    <li>赵俊杰</li>

    <li>董可</li>

</ul>

</div>


<table>

<tr>

<td>

<input type="button" id="xuanze" value=">>" onclick="sel()"/>

</td>

</tr>

</table>




<div id="canxuan">

<font size="+1">参选名单</font>

<ul id="cxdiv">

</ul>

</div>


</div>


</body>

</html>


正在回答

1 回答

就是想把左边选中的添加到右边框框里

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

帮忙看看怎么不行

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信