<!--#include file="conn.asp"-->
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
var school=new Array()//学院
var major=new Array()//专业
function init()
{
<%
dim sch,maj,i,j
i=0
set sch=conn.execute("select school from school")
if not sch.eof then
do while not sch.eof
j=1
%>
school[<%=i%>]="<%=trim(sch("school"))%>";
major[<%=i%>]=new Array();
major[<%=i%>][0]="请选择专业";
<%
set maj=conn.execute("select school,major from major where school='"&trim(sch("school"))&"'")
if not maj.eof then
%>
<%do while not maj.eof%>
major[<%=i%>]
major[<%=i%>][<%=j%>]="<%=trim(maj("major"))%>";
<%j=j+1
maj.movenext
loop
end if
maj.close :set maj=nothing
i=i+1
sch.movenext
loop
end if
sch.close :set sch=nothing
%>
if(school.length >0)
{
for(i=0;i<school.length;i++)
with(document.formClass.school)options[length]=new Option(school[i],school[i]);
}
}