主题:关于语法定义的问题
我在网页里运行时,总是提示打*的那两行有语法错误,可我怎么改都不对,这是怎么回事呢?小弟初学,对JSP不懂,求大虾帮忙看看!
<script language = "JavaScript">
<!--
var count;
count=0;
var subcat=new array();******
<%
count=0;******
do while not rs.eof
%>
subcat[<%=count%>]=new array("<%= rs("bid")%>");
<%
count=count+1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.msgadd.bid.length = 0;
var locationid=locationid;
var i;
for (i=0;i<count; i++)
{
if (subcat[i][1] == locationid)
{
document.msgadd.bid.options[document.msgadd.bid.length]=new Option(subcat[i][0], subcat[i][2]);
}
}
}
//-->
</script>
<script language = "JavaScript">
<!--
var count;
count=0;
var subcat=new array();******
<%
count=0;******
do while not rs.eof
%>
subcat[<%=count%>]=new array("<%= rs("bid")%>");
<%
count=count+1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.msgadd.bid.length = 0;
var locationid=locationid;
var i;
for (i=0;i<count; i++)
{
if (subcat[i][1] == locationid)
{
document.msgadd.bid.options[document.msgadd.bid.length]=new Option(subcat[i][0], subcat[i][2]);
}
}
}
//-->
</script>