高手请进!请问怎样将多选框 中"选中的多项内容"获取? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>start</title>
<LINK rel="stylesheet" href="../../css/main.css" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body MS_POSITIONING="GridLayout">
<FONT face="宋体"></FONT><FONT face="宋体"></FONT><FONT face="宋体"></FONT>
<BR>
<BR>
<form id="Form1" method="post" action="do.asp">
<table align="center">
<tr align=center>
<td width=160><select size=10 name="list1" style="width:120">
<option value=1>1111111</option>
<option value=2>2222222</option>
<option value=3>3333333</option>
<option value=4>4444444</option>
<option value=5>5555555</option>
<option value=6>6666666</option>
<option value=7>7777777</option>
</select></td>
<td><input type="button" value="增 加>>>" onclick="add()">
<br/>
<br/>
<input type="button" value="<<<删 除" onclick="del()">
</td>
<td width=79><select name="seqItem" id="seqItem" size="10" style="width:120">
</select></td>
<td width=79>
</td>
</tr>
</table>
<div align="center">
<input type="button" value="重 置" onClick="doRe()">
<input type="submit" name="ok" value="提 交">
</div>
</form>
<SCRIPT LANGUAGE="javascript">
var seqSelect=document.forms[0].seqItem;
var length=5;
function doRe(){
document.forms[0].action="";
document.forms[0].submit();
}
function setCursor(objStyle,cursor)
{
objStyle.cursor = cursor;
}
<!--
function goClick()
{
var res ="";
for (var i =0;i<seqSelect.options.length;i++)
{
if(seqSelect.options[i].selected)
{
res += seqSelect.options[i].index +",";
}
}
alert(res);
}
//-->
function add_singer(object,value,text)//添加数据
{
if(singer_exist(object,value)==false)
{
object.options.add(new Option(text,value,true,true));
return true;
}
return false;
}
function remove_singer(object,index)//删除数据
{
if(index<0)return false;
object.options.remove(index)
}
function singer_exist(object,value)//检查是否存在
{
for(var i=0;i<object.options.length; i++)
{
if(object.options[i].value==value)
return true;
}
return false;
}
function add()
{
var obj1=document.all.list1;
var index=obj1.selectedIndex;
if (index<0) return false;
value=obj1.options[index].value;
text=obj1.options[index].text;
var obj2=document.all.seqItem;
add_singer(obj2,value,text)
remove_singer(obj1,index)
}
function del()
{
var obj2=document.all.seqItem;
var index=obj2.selectedIndex;
if (index<0) return false;
value=obj2.options[index].value;
text=obj2.options[index].text;
var obj1=document.all.list1;
add_singer(obj1,value,text)
remove_singer(obj2,index)
}
</script>
</body>
</html>
效果就是将选中的多项内容获取?