急,我想ASP直接调用ASP分类表,不要商品品牌,打开时只显示全部分类,要怎样修改?<script type="text/javascript">
function displaySubMenu(li) {
var subMenu = li.getElementsByTagName("ul")[0];
if(subMenu!=null){
subMenu.style.display = "block";
}
}
function hideSubMenu(li) {
var subMenu = li.getElementsByTagName("ul")[0];
if(subMenu!=null){
subMenu.style.display = "none";
}
}
function displaySubMenu1(theobjid) {
var obj=document.getElementById(theobjid)
if(obj!=null){
obj.style.background='#FFB33B';
obj.style.color='#FFF';
obj.style.fontWeight='bold';
obj.style.backgroundImage="url(images/gogo.bmp)";
obj.style.backgroundRepeat="no-repeat";
obj.style.backgroundPosition="140px 0px";
}
}
function hideSubMenu1(theobjid) {
var obj=document.getElementById(theobjid);
if(obj!=null){
obj.style.background='#FFFFFF';
obj.style.color='#000';
obj.style.fontWeight='';
}
}
</script>
<TABLE class=p9black cellSpacing=0 cellPadding=2 width="99%" border=0>
<%
if typeid="" then
pidtype=0
else
pidtype=typeid
end if
set mainrs=server.CreateObject("ADODB.RecordSet")
mainsql="select * from YZ_Consume_GoodsType where ParentID="&pidtype&" order by SortID,Name"
set mainrs=conn.execute(mainsql)
while not mainrs.eof
%>
<TBODY>
<TR>
<TD width="6%" height="24" align=right vAlign=middle class="border-c"> </TD>
<TD width="94%" class="border-c" align="left">
<div ><img src="images/t_1.gif" width="10" height="9"> <a href="typelist.asp?typeid=<%=mainrs("ID")%>"><strong><%=mainrs("Name")%></strong></a></div>
<%
subsql="select * from YZ_Consume_GoodsType where ParentID="&mainrs("ID") &" order by SortID,Name"
set subrs=conn.execute(subsql)
while not subrs.eof
%>
<ul class="navigation" onmouseover="this.style.backgroundColor='#FFB33B';" onmouseout="this.style.backgroundColor='';">
<%
subsubsql="select * from YZ_Consume_GoodsType where ParentID="& subrs("ID") &" order by SortID,Name"
set subsubrs=conn.execute(subsubsql)
%><li onmouseover="displaySubMenu(this)" onmouseout="hideSubMenu(this)" ><a href="typelist.asp?typeid=<%=subrs("ID")%>" id="<%=subrs("ID")%>" onmouseover="displaySubMenu1('<%=subrs("ID")%>')" onmouseout="hideSubMenu1('<%=subrs("ID")%>')"><%=subrs("Name")%></a>
<%
if not subsubrs.eof then
%>
<ul>
<%
end if
subi=0
while not subsubrs.eof
%><li onmouseover="displaySubMenu1('<%=subrs("ID")%>')" onmouseout="hideSubMenu1('<%=subrs("ID")%>')"><a href="typelist.asp?typeid=<%=subsubrs("ID")%>"><%=subsubrs("Name")%></a></li>
<%
subsubrs.movenext
subi=subi+1
wend
%>
<%
if subi>0 then
%>
</ul>
<%
end if
%>
</li>
</ul>
<%
subrs.movenext
wend
%>
</TD>
</TR>
</TBODY>
<%
mainrs.movenext
wend
mainrs.close
set mainrs=nothing
%>
</TABLE>
<%
if typeid<>0 then
%>
<div class="detailtype">
<h2>品牌分类</h2>
<dl>
<dt></dt>
<%
brandsql="select * from YZ_Consume_GoodsBrand where ParentID="&typeid&" order by SortID,Name"
set brandrs=conn.execute(brandsql)
while not brandrs.eof
%>
<dd><a href="typelist.asp?typeid=<%=typeid%>&brandid=<%=brandrs("ID")%>"><%=brandrs("Name")%></a></dd>
<%
brandrs.movenext
wend
brandrs.close
set brandrs=nothing
%>
</dl>
<p>
<%
%>
</p>
<p>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="180" height="600">
<param name="movie" value="flash/banner2.swf" />
<param name="quality" value="high" />
<embed src="flash/banner2.swf" quality="high" pluginspage=" http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="180" height="600"></embed>
</object>
</p>
</div>
<p>
<%
end if
%>
</p>
<p>
</p>