日期:2014-05-16 浏览次数:20426 次
<%
Dim list
Set conn=Server.CreateObject("ADODB.Connection")
DBPath1=server.mappath("../db/db.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set rs=conn.execute("select a from b")
do while not rs.eof
list=list&"<option>"&rs("a")&"</option>"
rs.movenext
Loop
Rs.Close:Set Rs=Nothing
Response.write "<select id='scs' onchange='mselect()'>"&list&"</select>"
Response.write "<select id='scscms'>"&list&"</select>"
%>
<script type="text/javascript">
var option="";
function mselect(){
var scs=document.getElementById("scs");
var scscms=document.getElementById("scscms");
var n=scs.selectedIndex;
for(var i =0;i<scscms.options.length; i++){
if(scs.options[n].text==scscms.options[i].text)
scscms.options.remove(i);
}
if(option!="")scscms.add(option);
option=new Option(scs.options[n].text,"");
}
mselect();
</script>
var isFind = false;
for(var i =0;i<targetSelect.options.length; i++){