| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 615 人关注过本帖
标题:请高手看看这个ASP代码
只看楼主 加入收藏
chenhengrun
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-8
收藏
 问题点数:0 回复次数:2 
请高手看看这个ASP代码
红色部分出错,本人初学,不清楚怎样修改,请高手指导,谢谢!

<script language = "JavaScript">
aclass=new Array();
</script>
  <table width=221 border="0" align="center" cellpadding="0" cellspacing="0" background="images/left_menu_bg.jpg">
    <tr>
          <TD bgColor=#ffffff>&nbsp;</TD>
   </tr>
  <tr>        
    <TD><IMG height=26 src="images/left_menu_top.jpg"  
        width=221></TD>
      </tr>
      <tr>
      <td><TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
          <TBODY>
        <TR>
<%
set Rs=Server.CreateObject("Adodb.Recordset")
    sql="select * from SystemSite where id=1"
    Rs.open sql,conn,1,1
    leftjpg=Rs("leftjpg")
    leftjpgd=Rs("leftjpgd")
Rs.close
set Rs=nothing
%>
          <TD align=middle height=120 style="PADDING-TOP: 5px;PADDING-Right: 2px"><div align="center" ><img src="<%=leftjpg%>"   width="161" height="134"></DIV></TD>
        </TR>
        <TR>
              <td><div align="center" ><img src="images/left_menu_text_product.jpg" width="210" height="31" align="middle"></DIV></td>
        </TR>
        <TR>
          <TD align=middle height="2"></TD></TR></TBODY></TABLE></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        
        

              <%
set RsA = server.createobject("adodb.recordset")
RsA.source = "select id,parentid,content from deeptree where parentid=0 order by sorid"
RsA.open RsA.source,conn,1,1
if RsA.eof then response.write"&raquo;&sup1;&Atilde;&raquo;&Oacute;&ETH;&Iuml;à&sup1;&Oslash;&Auml;&Uacute;&Egrave;&Yacute;&pound;&iexcl;"
countone =0
while not RsA.eof
   Pid=RsA("id")
   c1 = RsA("content")
%>

          <tr onMouseOver="javascript:showorhide('s'+<%=rsa("id")%>);">
            <td width="23" height="36"></td>
            <td width="25"><img src="images/bullet.jpg" width="13" height="13"></td>
            <td width="173" align="left" class='Td.Top1'><a href="ProductsList.asp?deep=1&id=<%=RsA("id")%>&Str=<%=server.URLEncode(RsA("content"))%>"><%=c1%></a></td>
          </tr>
          <tr>
            <td colspan="3"><img src="images/left_line.jpg" width="221" height="1"></td>
          </tr>
        
              <tr><td id="<%="s" & pid%>" name="sclass" style="display:none;" colspan="3"><table border="0" cellpadding="0" cellspacing="0" width="100%">
              <%
         set RsB = server.createobject("adodb.recordset")
         RsB.source = "select id,parentid,content from deeptree where parentid="&Pid&""
         RsB.open RsB.source,conn,1,1
         while not RsB.eof
            Cid=RsB("id")
            c2 = RsB("content")
         %>
         <tr onMouseOver="javascript:showorhide('s'+<%=rsb("id")%>);">
            <td width="23" height="36" border="0"></td>
            <td width="25" border="0"></td>
            <td width="173" align="left"><a href="ProductsList.asp?deep=2&id=<%=RsB("id")%>&Str=<%=server.URLEncode(RsB("content"))%>&Pid=<%=Pid%>&PStr=<%=server.URLEncode(RsA("content"))%>"><%=c2%></a></td>
          </tr>
          <tr>
            <td colspan="3"><img src="images/left_line.jpg" width="221" height="1"></td>
          </tr>
          <tr><td id="<%="s" & Cid%>" name="ssclass" style="display:none;" colspan="3"><table border="0" cellpadding="0" cellspacing="0" width="100%">
         <%
         set RsC = server.createobject("adodb.recordset")
         RsC.source = "select id,parentid,content from deeptree where parentid="&Cid&""
         RsC.open RsC.source,conn,1,1
         while not RsC.eof
            c3 = RsC("content")
         %>
         <tr>
            <td width="23" height="36" border="0"></td>
            <td width="25" border="0"></td>
            <td width="173" align="left"><a href="ProductsList.asp?deep=3&id=<%=RsC("id")%>&ctr=<%=server.URLEncode(RsC("content"))%>&Cid=<%=Cid%>&ppStr=<%=server.URLEncode(RsB("content"))%>">&nbsp; &nbsp; <%=c3%></a></td>
          </tr>
          <tr>
            <td colspan="3"><img src="images/left_line.jpg" width="221" height="1"></td>
          </tr>
              <%
            RsC.movenext
         wend
         RsC.close
         set RsC=nothing %></table></td></tr>
              <%
            RsB.movenext
         wend
         RsB.close
         set RsB=nothing %></table></td></tr><%
'========
RsA.movenext
wend
RsA.close
set RsA=nothing
%>
        </table></td>
      </tr>
      <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
        <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
        <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
        <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
        <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
         <tr>
        <td height="25" background="images/left_menu_bg.jpg"></td>
      </tr>
      <tr>
        
      <td><a href="Company.asp-id=2.html"><div align="center" ><img src="<%=leftjpgd%>" width="185" height="63" border="0"></DIV></a></td>
      </tr>
       <tr>   
      <TD><IMG height=26 src="images/left_menu_top1.jpg"  
        width=221></TD>
        </tr>
    </table>
<script>
function showorhide(name){
hideall()
    var obj= document.getElementById(name);
    if (obj.style.display==""){
        //obj.style.display="none"
    }
    else
    {
        obj.style.display=""
    }
}
function hideall(){
    var i=0
    var patrn = /^s(\d)+$/;

    for(i;i<=aclass.length-1;i++)
    {
        document.getElementById(aclass[i]).style.display="none"
   
    }


}

</script>
搜索更多相关主题的帖子: background 221 ffffff images 
2012-04-08 17:04
chenhengrun
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-8
收藏
得分:0 
产品目录表
id    parentid    content    level    Sorid
45    0           条码打印机    1    1
51    0           条码扫描器    1    2
53    0           条码采集器    1    3
54    0           条码检测仪    1    4
67    0           条码耗材      1    5
68    45          Zebra 打印机    1    0
69    45          Argox 打印机    1    0
70    45          Postek 打印机    1    0
71    51          Metrologic 扫描器    1    0
72    51          symbol 扫描器    1    0
73    51          Mindeo 扫描器    1    0
74    51          Argox 扫描器     1    0
75    53          Unitech 采集器    1    0
77    68          无线打印机       1    0
78    68           AAAA          1    0
79    45           BBBB           1    0

产品表
ID    LName    LSort    LSortname    LPH    LPrice
202    Zebra 105SL    45-68    ->条码打印机->Zebra 打印机    N2012329214147   
203    Zebra 110Xi4    45-68    ->条码打印机->Zebra 打印机    N2012329215945   
205    Zebra 140Xi4    45-68    ->条码打印机->Zebra 打印机    N2012329221026   
206    Zebra 888-TT    45-68    ->条码打印机->Zebra 打印机    N2012329221135   
207    Zebra GK888    45-68    ->条码打印机->Zebra 打印机    N2012329221411   
208    Zebra S4M    45-68    ->条码打印机->Zebra 打印机    N2012329221632   
209    Zebra ZM400    45-68    ->条码打印机->Zebra 打印机    N2012329222047   
210    Zebra ZM600    45-68    ->条码打印机->Zebra 打印机    N2012329222319   
211    aaa    45-68-77    ->条码打印机->Zebra 打印机->无线打印机    N20124813489   
2012-04-08 17:15
chenhengrun
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2012-4-8
收藏
得分:0 
已经解决,改为:
<a href="ProductsList.asp?deep=3&id=<%=Rsc("id")%>&Str=<%=server.URLEncode(Rsc("content"))%>&Cid=<%=Cid%>&bStr=<%=server.URLEncode(Rsb("content"))%>&Pid=<%=Pid%>&PStr=<%=server.URLEncode(RsA("content"))%>">&nbsp; &nbsp; <%=c3%></a>

ProductsList.asp 也要相应修改
2012-04-09 10:23
快速回复:请高手看看这个ASP代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020394 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved