当前位置:首页
开发技术指南» 文章正文
    引言:

    摘要: 我建了一个activex dll 工程,有a,b,c,d四个class,其中a的instancing属性为multiuse,其余的都为private。关系是a调用b,b调用c,c调用d。编译成dll后测试是通过的,但我把它添加了一些代码(实现共享的)配置成com+后,就出现了些问题,原来保存在d中的变量,现在无法取到了,不知道是什么原因? 相关代码如下: a: implements obj......
    摘要: 请教算法高手:如何让切线变成弧形的风格? 1) 切线示例 link1 link2 link3 link4 link5 2) 弧线示例 link1 link2 link3 link4 link5 3) 切线链接形状代码 private int space = 20; private int rows = 8; 链接项生成循环区 { menulink.attributes.a......


四级关联菜单

|a|b|  
  ------  
  |2|3|  
  |4|2|  
  |5|3|  
  |8|3|  
  |6|4|  
  |1|5|  
  |7|3|  
  |9|2|  
   
  在b字段里有固定的4个值,由B字段用户创建的a字段用户,我想开发一个四级查询菜单:  
   
  一级|二级|三级|四级  
  3   2   4  6  
  3   5   1  
  2   4   6  
  5   1  
   
  就是把B当作上一级菜单,A当下一级菜单。从一级菜单中选择要查询B用户,在A项中查询相应的由B创建的用户并在二级菜单中列出;再在二级菜单选择要查询的用户,在A项中查询相应的由B创建的用户并在三级菜单中列出;......  
  如果未找到,则列出空值  
   
  如:  
  一级菜单先3,则二级菜单列出2、5、8、7;二级菜单选2,三级菜单列出4、9;三级菜单选4,四级菜单列出6。  
  一级菜单选5,二级菜单列出1,再先1的话,三级菜单是空的  
   
  用ASP如何实现呀,现在头大着呢,麻烦各位GG、JJ、DD、MM指点一下,在此谢过.....

NO.1   作者: emhuangzi

四级联动菜单  
  <%  
  Dim   Cn,Rs  
  Dim   SQL,StrDSN  
  dim   L:L=12\编码总长度  
  dim   first:first=string(L,"0")    
  a=array(0,2,1,4,5)  
  Set   cn=Server.CreateObject("ADODB.connection")  
  Set   Rs   =   Server.CreateObject("ADODB.Recordset")  
  StrDSN   =   "Driver={Microsoft   Access   Driver   (*.mdb)};   DBQ="    
  StrDSN   =   StrDSN   &   Server.MapPath("db4.mdb")  
  Cn.Open   strDSN  
  x=cint(Request("x"))+1  
  first=trim(Request("first"))  
  sub   addfirst(x)  
      dim   m:m=0\m代表祖宗字串的长度,假设根节点是12个0            
      for   i=0   to   x-1  
          m=m+a(i)  
      next  
  SQL="select   *   from   tb   where   code   like   \"   &   left(first,m)       &   string(a(x),"_")     &   string(L-m-a(x),"0")   &   "\   and   code<>\"   &   first     &   "\"  
      Rs.Open   SQL,cn,3,2  
  if   Rs.RecordCount>1   then    
  first=rs("code")    
  do   while   not   Rs.EOF%>d.Add   "<%=rs("code")%>",   "<%=rs("name")%>"  
  <%  
  Rs.MoveNext  
  loop  
  end   if  
  Rs.Close  
  end   sub  
  %>  
  <SCRIPT   LANGUAGE=vbscript   >  
  Dim   d,o     \   创建对象变量。  
  Set   d   =   CreateObject("Scripting.Dictionary")  
  <%addfirst   x%>  
  dim   x:x=<%=x%>  
  dim   first:first="<%=first%>"  
  remove   x   \移除      
  addo   x   \增加    
  sub   remove(x)\移除        
  for   each   ooo   in   eval("parent.f.S"   &   x   &   ".options")      
      execScript   "parent.f.S"   &   x   &   ".remove   "   &   ooo.index,"vbs"            
  next    
  end   sub  
  sub   addo(x)   \增加          
      for   each   code   in   d.Keys  
        set   o=document.createElement("option")    
        o.text=d.Item(code)  
        o.value=code  
        execScript   "parent.f.S"   &   x   &   ".add   o","vbs"      
      next    
  end   sub  
  if   x   <4   and   eval("parent.f.S"   &   x   &   ".length")<>0   then   window.location.href="Q.asp?x="   &   x   &   "&first="   &   first  
  </SCRIPT>  
  <%Cn.Close  
  set   rs=nothing  
  set   cn=nothing%>


    摘要: 我下载了一些e书,以前还可以看的,可最近不知是出了什么问题,我双击后,看不到书的内容了,标题栏却出现web compiler 2000这样的字眼,听说web compiler 2000是一个反编译软件,为什么会出现这样的问题啊? 如何解决? ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE