28,390
社区成员
发帖
与我相关
我的任务
分享
<script language="JavaScript">
<!--
function s(geto)
{
var at_location = document.getElementById("PerID").innerText.indexOf(geto);
if (at_location == 0) {
return false;
}
document.getElementById("PerID").innerText=document.getElementById("PerID").innerText+geto+",";
}
//-->
</script>
<select name="list1" size="15" multiple="multiple" class="TextBox_Touch" style=" width: 100%;background-color: rgb(255, 255, 204);" ondblclick="moveOption(document.myform.list1, document.myform.list2)">
<%
set rsSelect=server.CreateObject("ADODB.RecordSet")
sqlSelect="select * from [Table]"
rsSelect.Open sqlSelect,conn,1,1
if not rsSelect.EOF then
while not rsSelect.EOF
%>
<option value="<%=trim(rsSelect("ID"))%>"><%=rsSelect("Name")%></option>
<%
rsSelect.MoveNext
wend
%>
<%
else
Response.Write "<option value=''>目前还没有</option>"
end if
rsSelect.Close
set rsSelect=nothing
%>
</select>
<div class="gp"><a class="clsFd bgF1"></a><a class="gpTit">清除</a></div>
<select name="list2" id="list2" size="10" multiple="multiple" class="TextBox_Touch" style=" width: 100%;background-color: rgb(255, 255, 204);" ondblclick="moveOption(document.myform.list2, document.myform.list1)">
</select></div>
</div></td><script language="JavaScript">
<!--
function moveOption(e1,e2){
try{
for(var i=0;i<e1.options.length;i++){
if(e1.options[i].selected){
var e = e1.options[i];
e2.options.add(new Option(e.text, e.value));
e1.remove(i);
i=i-1
}
}
document.myform.PerID.value=getvalue(document.myform.list2);
}
catch(e){}
}
function getvalue(geto){
var allvalue = "";
for(var i=0;i<geto.options.length;i++){
allvalue +=geto.options[i].value + ",";
}
return allvalue;
}
//-->
</script>
<textarea id="PerID" name="PerID" class="cMitxt cMitra cMt0" style="overflow: visible; width: 100%;background-color: rgb(255, 255, 204);" readonly="readonly">请选择</textarea>