关于ASP的SUB调用问题,代码如下:我想修改成子分类要用鼠标点击才能展开,默认是自动展开的!!!

SubShowSmallClass_Tree2()%><SCRIPTlanguage=javascript>functionopencat(cat,img){if(cat... Sub ShowSmallClass_Tree2()
%>
<SCRIPT language=javascript>
function opencat(cat,img){
if(cat.style.display=="none"){
cat.style.display="";
img.src="img/class2.jpg";
} else {
cat.style.display="none";
img.src="img/class1.jpg";
}
}
</Script>
<TABLE cellSpacing=0 cellPadding=0 width="99%" border=0>
<%
dim i
set rsbig = server.CreateObject ("adodb.recordset")
sql="select * from bphoto"
rsbig.open sql,conn,1,1
if rsbig.eof and rsbig.bof then
Response.Write "栏目正在建设中……"
else
i=1
do while not rsbig.eof
%>
<TR>
<TD language=javascript onmouseup="opencat(cat10<%=i%>000, img10<%=i%>000);" id=item$pval[catID]) style="CURSOR: hand" width=34 height=24 align=center><IMG id=img10<%=i%>000 src="img/class1.jpg" width=13 height=13></TD>
<TD width="662" > <a href='photo.asp?BigClassName=<%=rsbig("BigClassName")%>'><FONT
color=#243d51><STRONG><%=rsbig("BigClassName")%></STRONG></FONT></A></a></TD>

</TR>

<TR>
<TD id=cat10<%=i%>000 <%if rsbig("BigClassName")=BigClassName then
response.write "style='DISPLAY'"
else

end if%> colspan="2">
<%
dim rsSmall,sqls,j
set rsSmall = server.CreateObject ("adodb.recordset")
sqls="select * from sphoto where BigClassName='" & rsbig("BigClassName") & "' order by SmallClassID"
rsSmall.open sqls,conn,1,1
if rsSmall.eof and rsSmall.bof then
Response.Write ""
else
j=1
do while not rsSmall.eof
%>
 <IMG height=20 src="img/class3.gif" width=26 align=absMiddle border=0>  <a href="photo.asp?BigClassName=<%=rsSmall("BigClassName")%>&Smallclassname=<%=rsSmall("SmallClassName")%>"><FONT color=#243d51><%=rsSmall("SmallClassName")%></FONT></a><BR>

<%
rsSmall.movenext
j=j+1
loop
end if
rsSmall.close
set rsSmall=nothing
%>
</TD>
</TR>

<%
rsbig.movenext
i=i+1
loop
rsbig.close
set rsbig=nothing
end if
%>
</TABLE>
<%
end Sub
展开
 我来答
wdz1985
2012-03-15 · 超过20用户采纳过TA的回答
知道答主
回答量:78
采纳率:0%
帮助的人:57.1万
展开全部
language=javascript onmouseup="opencat(cat10<%=i%>000, img10<%=i%>000);"
改成language=javascript onclick="opencat(cat10<%=i%>000, img10<%=i%>000);"
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式