网络编程 
首页 > 网络编程 > 浏览文章

asp实现无限级分类的方法js版

(编辑:jimmy 日期: 2024/10/26 浏览:3 次 )
MenuArr=new Array()
MenuLenArr=new Array()
SubMenuArr=new Array()
MenuIdArr=new Array()
MenuArr[1]="<%call top11%>" //洲名|||...
MenuArr[2]="<%call top1%>" //洲名###国名|||...
MenuIdArr[1]="zhou"
MenuIdArr[2]="author"
MenuClass=2 //4级菜单
splitchar1="|||";
splitchar2="###";
基本的menuArr[1]与menuArr[2]用类输出
options.add(new Option( "-----请选择-----",""));
add(new Option("text","value"))用法
js生成的value值为top1中的名字,有些用id,有些用文字,在结合数据库select的可行性的原则下修改
sub top1

sql="select * from type2"
rs.open sql,conn,1,1
while not rs.eof
a=rs("id2")
b=rs("p_type2")
call top2(a,a)
rs.movenext
wend
rs.close
end sub

sub top11

sql="select * from type2"
rs.open sql,conn,1,1
while not rs.eof
response.write (rs("p_type2")&"|||")
rs.movenext
wend
rs.close
end sub
sub top2 (id,b)
sqle="select DISTINCT(author) from product where id2="&id
set rsa=server.CreateObject("adodb.recordset")
rsa.open sqle,conn,1,1
if not(rsa.eof) then
while not rsa.eof    
response.write (b&"###")
response.write rsa("author")&"|||"
rsa.movenext
wend
else
response.write (b&"###")
response.write "无"&"|||"
end if
rsa.close
end sub

%>
上一篇:无组件生成缩略图
下一篇:asp 防止SQL注入代码
一句话新闻
微软与英特尔等合作伙伴联合定义“AI PC”:键盘需配有Copilot物理按键
几个月来,英特尔、微软、AMD和其它厂商都在共同推动“AI PC”的想法,朝着更多的AI功能迈进。在近日,英特尔在台北举行的开发者活动中,也宣布了关于AI PC加速计划、新的PC开发者计划和独立硬件供应商计划。
在此次发布会上,英特尔还发布了全新的全新的酷睿Ultra Meteor Lake NUC开发套件,以及联合微软等合作伙伴联合定义“AI PC”的定义标准。
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap