复制代码代码如下:
<%
dim a
a = split (request.form ("azedista"), "")
Response.Write "Fonte:" & Request.Form ("Sourcelist") e Ubound (a) & "<br> Objeto:" & request.form ("objectList") & "<br>"
%>
<html>
<head>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<title> Documento sem título </title>
<Tipo de estilo = texto/css>
.bgsubleft {
Posição de fundo: fundo central; Imagem de fundo: URL (imagens/bgleft.gif); Repetição de fundo: repetição-x
}
.bgsubleftn {
Posição de fundo: parte inferior esquerda; Imagem de fundo: URL (imagens/bgleftn.gif); Repetição de fundo: sem repetição
}
</Style>
<Script Language = "JavaScript" type = "text/javascript">
função addSelectectedList ()
{
var objSource = form1.sourcelist;
var objObject = form1.ObjectList;
var Sourcelen = objSource.Length;
for (var i = 0; i <fonte; i ++) {
if (objsource.options [i] .Selected) {
if (!
addtolist (objobject, objSource.options [i] .text, objSource.options [i] .Value);
}
}
}
}
função addalllist ()
{
var objSource = form1.sourcelist;
var objObject = form1.ObjectList;
var Sourcelen = objSource.Length;
for (var i = 0; i <fonte; i ++) {
if (!
addtolist (objobject, objSource.options [i] .text, objSource.options [i] .Value);
}
}
}
função removeselectectedlist (noremoveValue)
{
var objObject = form1.ObjectList;
for (var i = 0; i <objobject.length; i ++) {
if (objobject.options [i] .Selected && objobject.options [i] .Value! = NoremoveValue)
{
objobject.options.remove (i);
Removelista (NoremoveValue); quebra;
}
}
}
função removealllist (noremoveValue)
{
var objObject = form1.ObjectList;
var objlen = objobject.length;
for (var i = 0; i <objlen; i ++) {
if (objobject.options [i] .Value! = NoremoveValue) {
objobject.options.remove (i);
removealllist (noremoveValue); quebra;
}
}
}
função selecionadaLAl (OBJ)
{
for (var i = 0; i <obj.length; i ++) {
obj.options [i] .Selected = true;
}
}
função checkexist (obj, valor)
{
var isexist = false;
for (var i = 0; i <obj.length; i ++) {
if (obj.options [i] .Value == Value) {
isExist = true;
quebrar;
}
}
retornar isexist;
}
função addTolist (obj, valor, etiqueta) {
obj.add (nova opção (valor, etiqueta));
}
</script>
</head>
<corpo bgcolor = "#ffffff">
<formul
<tabela CellSpacing = "0" CellPadding = "0">
<tr>
<Td> <select name = "Sourcelist" size = "10" múltiplo id = "Sourcelist">
<opção value = "a"> 1 </pption>
<opção value = "b"> 2 </pption>
<opção value = "c"> 3 </pption>
<%
para i = 6 a 20
Response.write ("<opção value =" "" & i+200 & "
Próximo
%>
</leclect> </td>
<Td> <input name = "add" type = "button" id = "add" value = "add" onclick = "addSelectedList ()"> <br>
<input name = "add" type = "button" id = "add" value = "add all" onclick = "addallList ()"> <br>
<input name = "add" type = "button" id = "adicionar" value = "remover" onclick = "removeselectedlist ('a')"> <br>
<input name = "add" type = "button" id = "adicionar" value = "remover tudo" onclick = "removeAlllList ('a')">>
<input name = "add" type = "button" id = "add" value = "selecione all" onclick = "selectedAll (form1.objectList)"> </td>
<Td> <select name = "objectList" size = "10" múltiplo id = "objectList">
<opção value = "a"> 1 </pption>
<opção value = "d"> 4 </pption>
<opção value = "e"> 5 </pption>
<%
para i = 6 a 20
Response.Write ("<option value =" "" & i & "
Próximo
%>
</leclect> </td>
</tr>
<tr>
<Td> </td>
<Td> <input name = "subm" type = "submit" value = "submit"> </td>
<Td> </td>
</tr>
</tabela>
</morm>
</body>
</html>