泪求asp三级动态树形导航菜单 15
这是个二级的,点击小类展开三级类;我想把大类加上,点击大类展开小类,再点小类展开三级类<scriptlanguage="JavaScript">functionshowl...
这是个二级的,点击小类展开三级类;我想把大类加上,点击大类展开小类,再点小类展开三级类
<script language="JavaScript">
function showlist(x){
if (x.style.display=="none"){
x.style.display = "";
}
else{
x.style.display="none"
}
}
</script>
<%
response.Write("<table border=""0"" cellpadding=""0"" cellspacing=0 align=""right"" width=""100%"" >")
set rs=server.CreateObject("adodb.recordset")
sql="select * from newssmallclass where bigclassname='赤山揽胜'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("<tr><td>暂时还没有类别</td></tr>")
else
m=1
do while not rs.eof
m=m+1
response.Write("<tr onclick=""showlist(subtype"&m&")"" style=""cursor:hand"" align=""right"" ><td align=""center""height=""30"" style=""padding-left:35px;"" class=""xuxian"" valign=""middle""><img src=""images/11_10.jpg""> "&rs("smallclassname")&"</td></tr>")
set rssmall=server.CreateObject("adodb.recordset")
sql="select * from newsssmallclass where smallclassname='"&rs("smallclassname")&"'"
rssmall.open sql,conn,1,1
if rssmall.bof and rssmall.eof then
response.Write("<tr><td></td></tr>")
else
response.write "<tr id=""subtype"&m&""" style='display:none'><td><table border=""0"" cellpadding=""0"" cellspacing=0 width=""170"">"
do while not rssmall.eof
response.Write("<tr ><td height=""30"" valign=""bottom"" align=""middle"" style=""padding-left:35px;"" class=""xuxian""><a href='news.asp?bigclassname="&rs("bigclassname")&"&smallClassName=" & rs("smallClassName") & "&sSmallClassName=" & rssmall("sSmallClassName") & "' style=""text-align:center""><img src=""images/11_10.jpg"">" & rssmall("ssmallclassname")&"</a></td></tr>")
rssmall.movenext
loop
response.write "</table></td></tr>"
rssmall.close
set rssmall=nothing
end if
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
<td height="30" class="xuxian" style="padding-right:35px;"><img src="images/11_10.jpg">
<a href="info.asp?id=3&bigclassname=赤山揽胜">景区地图</a></td>
<%response.Write("</table>")%> 展开
<script language="JavaScript">
function showlist(x){
if (x.style.display=="none"){
x.style.display = "";
}
else{
x.style.display="none"
}
}
</script>
<%
response.Write("<table border=""0"" cellpadding=""0"" cellspacing=0 align=""right"" width=""100%"" >")
set rs=server.CreateObject("adodb.recordset")
sql="select * from newssmallclass where bigclassname='赤山揽胜'"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write("<tr><td>暂时还没有类别</td></tr>")
else
m=1
do while not rs.eof
m=m+1
response.Write("<tr onclick=""showlist(subtype"&m&")"" style=""cursor:hand"" align=""right"" ><td align=""center""height=""30"" style=""padding-left:35px;"" class=""xuxian"" valign=""middle""><img src=""images/11_10.jpg""> "&rs("smallclassname")&"</td></tr>")
set rssmall=server.CreateObject("adodb.recordset")
sql="select * from newsssmallclass where smallclassname='"&rs("smallclassname")&"'"
rssmall.open sql,conn,1,1
if rssmall.bof and rssmall.eof then
response.Write("<tr><td></td></tr>")
else
response.write "<tr id=""subtype"&m&""" style='display:none'><td><table border=""0"" cellpadding=""0"" cellspacing=0 width=""170"">"
do while not rssmall.eof
response.Write("<tr ><td height=""30"" valign=""bottom"" align=""middle"" style=""padding-left:35px;"" class=""xuxian""><a href='news.asp?bigclassname="&rs("bigclassname")&"&smallClassName=" & rs("smallClassName") & "&sSmallClassName=" & rssmall("sSmallClassName") & "' style=""text-align:center""><img src=""images/11_10.jpg"">" & rssmall("ssmallclassname")&"</a></td></tr>")
rssmall.movenext
loop
response.write "</table></td></tr>"
rssmall.close
set rssmall=nothing
end if
rs.movenext
loop
rs.close
set rs=nothing
end if
%>
<td height="30" class="xuxian" style="padding-right:35px;"><img src="images/11_10.jpg">
<a href="info.asp?id=3&bigclassname=赤山揽胜">景区地图</a></td>
<%response.Write("</table>")%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询