谁能帮我解释一下这一段asp代码啊! 谢谢了
%><SCRIPTlanguage=javascript>functionopencat(cat,img){if(cat.style.display=="none"){c...
%>
<SCRIPT language=javascript>
function opencat(cat,img){
if(cat.style.display=="none"){
cat.style.display="";
img.src="img/class2.gif";
} else {
cat.style.display="none";
img.src="img/class1.gif";
}
}
</Script>
<table cellspacing="2" cellpadding="0" width="97%" align="center" border="0">
<%
dim i
set rsbig = server.CreateObject ("adodb.recordset")
sql="select * from BigClass"
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=25 align=center><IMG id=img10<%=i%>000 src="img/class1.gif" width=15 height=17></TD>
<TD ><a href='Product.asp?BigClassName=<%=rsbig("BigClassName")%>'><%=rsbig("BigClassName")%></a></TD>
</TR>
<TR>
<TD id=cat10<%=i%>000 <%if rsbig("BigClassName")=BigClassName then
response.write "style='DISPLAY'"
else
response.write "style='DISPLAY: none'"
end if%> colspan="2" style=" padding-left:20px;padding-top:5px; padding-bottom:5px;">
<%
dim rsSmall,sqls,j
set rsSmall = server.CreateObject ("adodb.recordset")
sqls="select * from SmallClass 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="Product.asp?BigClassName=<%=rsSmall("BigClassName")%>&Smallclassname=<%=rsSmall("SmallClassName")%>"><%=rsSmall("SmallClassName")%></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
我现在刚刚才学习这个因为没时间专门去学习所以就找了个网站的模板看
我的QQ是270164700 谢谢 展开
<SCRIPT language=javascript>
function opencat(cat,img){
if(cat.style.display=="none"){
cat.style.display="";
img.src="img/class2.gif";
} else {
cat.style.display="none";
img.src="img/class1.gif";
}
}
</Script>
<table cellspacing="2" cellpadding="0" width="97%" align="center" border="0">
<%
dim i
set rsbig = server.CreateObject ("adodb.recordset")
sql="select * from BigClass"
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=25 align=center><IMG id=img10<%=i%>000 src="img/class1.gif" width=15 height=17></TD>
<TD ><a href='Product.asp?BigClassName=<%=rsbig("BigClassName")%>'><%=rsbig("BigClassName")%></a></TD>
</TR>
<TR>
<TD id=cat10<%=i%>000 <%if rsbig("BigClassName")=BigClassName then
response.write "style='DISPLAY'"
else
response.write "style='DISPLAY: none'"
end if%> colspan="2" style=" padding-left:20px;padding-top:5px; padding-bottom:5px;">
<%
dim rsSmall,sqls,j
set rsSmall = server.CreateObject ("adodb.recordset")
sqls="select * from SmallClass 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="Product.asp?BigClassName=<%=rsSmall("BigClassName")%>&Smallclassname=<%=rsSmall("SmallClassName")%>"><%=rsSmall("SmallClassName")%></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
我现在刚刚才学习这个因为没时间专门去学习所以就找了个网站的模板看
我的QQ是270164700 谢谢 展开
2个回答
展开全部
这个代码你看不懂吗,这个是最基本的啦。我没有方法去描述这个问题。你提供个QQ号到时我加你,给你做个解释。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
AiPPT
2024-09-19 广告
2024-09-19 广告
作为北京饼干科技有限公司的工作人员,关于AIPPT免费生成PPT的功能,我可以简要介绍如下:AIPPT是一款基于人工智能技术的PPT制作工具,它为用户提供了免费生成PPT的便捷服务。用户只需简单输入PPT的主题或内容大纲,AIPPT便能智能...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询