复制代码代码如下::
<%
dim a
a = split (request.form ("Sourcelist"), ",")
Antwort.Write "Quelle:" & Request.form ("Sourcelist") & Ubound (a) & "<br> Objekt:" & Request.form ("ObjectList") & "<br>"
%>
<html>
<kopf>
<meta http-äquiv = "content-type" content = "text/html; charset = gb2312">
<title> unbenannte Dokument </title>
<Style type = text/css>
.bgsulbleft {
Hintergrundposition: Mitte unten; Hintergrundbild: URL (Bilder/bgleft.gif); Hintergrundrepeat: Repeat-X
}
.bgSulbleftn {
Hintergrundposition: Links unten; Hintergrundbild: URL (Bilder/bgleftn.gif); Hintergrundrepeat: No-Repeat
}
</Style>
<script Language = "JavaScript" type = "text/javaScript">
Funktion addSelectedList ()
{
var ObjSource = Form1.Sourcelist;
var objObject = Form1.Objectlist;
var saurcelen = objSource.length;
für (var i = 0; i <saurcelen; i ++) {
if (objSource.options [i] .Selected) {
if (! pechexist (objobject, objSource.options [i] .Value)) {
Addtolist (Objobject, ObjSource.Options [i] .text, objSource.options [i] .Value);
}
}
}
}
Funktion addhallList ()
{
var ObjSource = Form1.Sourcelist;
var objObject = Form1.Objectlist;
var saurcelen = objSource.length;
für (var i = 0; i <saurcelen; i ++) {
if (! pechexist (objobject, objSource.options [i] .Value)) {
Addtolist (Objobject, ObjSource.Options [i] .text, objSource.options [i] .Value);
}
}
}
Funktionsumentwickelte Liste (NoremoveValue)
{
var objObject = Form1.Objectlist;
für (var i = 0; i <objObject.length; i ++) {
if (objObject.options [i] .Selected && objObject.options [i] .Value! = NoremoveValue)
{
objObject.options.remove (i);
Removelist (NoremoveValue); Break;
}
}
}
Funktion removeAlllist (NoremoveValue)
{
var objObject = Form1.Objectlist;
var objlen = objObject.length;
für (var i = 0; i <objlen; i ++) {
if (objObject.options [i] .Value! = NoremoveValue) {
objObject.options.remove (i);
removealllist (NoremoveValue); Break;
}
}
}
Funktion ausgewählt (OBJ)
{
für (var i = 0; i <obj.length; i ++) {
obj.options [i] .Selected = true;
}
}
Funktion pokkexist (obj, Wert)
{
var isExist = false;
für (var i = 0; i <obj.length; i ++) {
if (obj.options [i] .Value == value) {
isexist = true;
brechen;
}
}
zurückleuchten;
}
Funktion addtolist (obj, value, label) {
obj.add (neue Option (Wert, Etikett));
}
</script>
</head>
<body bgcolor = "#ffffff">
<form name = "Form1" action = "temp.asp" methode = "post">
<table Cellspacing = "0" cellpadding = "0">
<tr>
<td> <select name = "Sourcelist" size = "10" multiple id = "Sourcelist">
<option value = "a"> 1 </option>
<Option Value = "B"> 2 </Option>
<Option Value = "C"> 3 </Option>
<%
für i = 6 bis 20
Response.write ("<option value =" "" "& i+200 &" ""> "& i+200 &" </option> "& vbcrlf)
Nächste
%>
</select> </td>
<td> <input name = "add" type = "button" id = "add" value = "add" onclick = "addSelectedList ()"> <br>
<input name = "add" type = "button" id = "add" value = "alles hinzufügen" onclick = "addAllList ()"> <br>
<input name = "add" type = "button" id = "add" value = "remove" onclick = "RemoveSelectedList ('a')"> <br>
<input name = "add" type = "button" id = "add" value = "All" onclick = "removealllist ('a')">
<input name = "add" type = "button" id = "add" value = "All" onclick = "selectedAll (Form1.ObjectList)"> </td>
<td> <select name = "objectList" size = "10" multiple id = "objectList">
<option value = "a"> 1 </option>
<Option Value = "D"> 4 </Option>
<option value = "e"> 5 </option>
<%
für i = 6 bis 20
Response.write ("<option value =" "" & i & "" ">" & i & "</option>" & vbcrlf)
Nächste
%>
</select> </td>
</tr>
<tr>
<td> </td>
<td> <input name = "subm" type = "suruging" value = "subieren"> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>