如何变成数组输出???javacript高手来。
<%dim count
rs3.open"select xueyuan from jiaoyuanclass group by xueyuan",conn,1,1
%>
<script language="JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs3.eof
%>
subcat[<%=count%>] = new Array("<%= left(trim(rs3("xueyuan")),1)%>","<%= trim(rs3("xueyuan"))%>","无");
<%
count = count + 1
rs3.movenext
loop
call rs3close()
'call connclose()
%>
onecount=<%=count%>;
function keydown()
{
document.getElementById("xue").length = 0;
//document.getElementById(dd).length = 0;
var xueyuan=document.ff.xueyuan.value;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][0] == xueyuan)
{
//document.ff.gudingzhi.options[document.ff.gudingzhi.length] = new Option(subcat[i][1]);
//var Data_School = new Option(subcat[i][1]);
//var Data_School = subcat[i][1];
//document.ff.gudingzhi.options[document.ff.gudingzhi.length] = new Option(subcat[i][1]);
//document.getElementById("xue").innerHTML=subcat[i][1];
document.getElementById("xue").innerHTML=subcat[i][1];
//document.ff.gudingzhi.value=subcat[i][1];
//document.getElementById(dd).value=subcat[i][1];
}
//else
//{
// document.ff.gudingzhi.value="";
//}
}
}
[ 本帖最后由 ysf0181 于 2010-7-1 17:21 编辑 ]