<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script type="text/javascript">
function submit() {
document.forms[0].action = "../msg/distribution/submit.htm";
document.forms[0].submit();
}
</script>
<script>
function tt(){
var sel = document.getElementById('left_');
sel.options.add(new Option("1","1"));
sel.options.add(new Option("2","2"));
sel.options.add(new Option("3","3"));
} </script>
<script>
function right_move()
{
var con_data=[];
for(var i=0;i<$("left_").length;i++)
{
if($("left_").options[i].selected)
con_data[con_data.length]=[$("left_").options[i].value,$("left_").options[i].text];
}
$("right_").length=$("right_").length;
for(var i=0;i<con_data.length;i++)
{
var con_fla=true;
for(var k=0;k<$("right_").length;k++)
{
if(con_data[i][0]==$("right_").options[k].value)
con_fla=false;
}
if(con_fla)
$("right_").options[$("right_").length]=new Option(con_data[i][1],con_data[i][0]);
}
}
function right_all_move()
{
var con_data=[];
for(var i=0;i<$("left_").length;i++)
{
if($("left_").options[i])
con_data[con_data.length]=[$("left_").options[i].value,$("left_").options[i].text];
}
$("right_").length=$("right_").length;
for(var i=0;i<con_data.length;i++)
{
var con_fla=true;
for(var k=0;k<$("right_").length;k++)
{
if(con_data[i][0]==$("right_").options[k].value)
con_fla=false;
}
if(con_fla)
$("right_").options[$("right_").length]=new Option(con_data[i][1],con_data[i][0]);
}
}function del_right()
{
var index_data=[];
for(var i=0;i<$("right_").length;i++)
{
if($("right_").options[i].selected)
index_data[index_data.length]=[i];
}
for(var i=index_data.length-1;i>=0;i--)
{
$("right_").removeChild($("right_").options[index_data[i]]);
}
}
function del_all_right()
{
var index_data=[];
for(var i=0;i<$("right_").length;i++)
{
if($("right_").options[i])
index_data[index_data.length]=[i];
}
for(var i=index_data.length-1;i>=0;i--)
{
$("right_").removeChild($("right_").options[index_data[i]]);
}
}function $(id){return document.getElementById(id);}
</script>
</head>
<body onload="tt()">
<br>
<form action="/msg/distribution/submit.htm" method="post">
<input id="id" type="text" size="50" >
<br/>
<input name="msg_title" id="msg_title" type="text" size="50" >
<br/>
<input id="msg_body" type="text" size="50" >
<br/>
<input id="msg_zd" type="text" size="50" >
<br/>
<br/>
<table width="355" height="192" border="1">
<tr>
<td width="128" align="center" valign="middle"><select name="left_" size="7" multiple="multiple" id="left_" style="width:100px;">
</select></td>
<td width="101" align="center" valign="middle"><input type="button" name="Submit" style= "height:20px;width:80px "value=" 右 移>> " onclick="right_move()";/>
<br />
<br />
<input type="button" name="Submit" value=" 全部移动>> " style= "height:20px;width:80px " onclick="right_all_move();"/>
<br />
<br />
<input type="button" name="Submit2" value=" 删 除 " style= "height:20px;width:80px " onclick="del_right();" />
<br />
<br />
<input type="button" name="Submit2" value=" 全部删除 " style= "height:20px;width:80px " onclick="del_all_right();" />
</td>
<td width="128" align="center" valign="middle"><select name="right_" size="7" multiple="multiple" id="right_" style="width:100px;">>
</select></td>
</tr>
</table>
<br />
<input type="submit" name = "submit" value="提交" >
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货