脚本宝典收集整理的这篇文章主要介绍了asp实现无限级分类的方法js版,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
MenuArr=new Array()
MenuLenArr=new Array()
S
ubMenuArr=new Array()
MenuIdArr=new Array()
MenuArr[1]="<%call top11%>" //洲名|||
...
MenuArr[2]="<%call top1%>" //洲名
###国名|||...
MenuIdArr[1]="zhou"
MenuIdArr[2]="author"
MenuClass=2 //4级菜单
spl
ITchar1="|||";
splitchar2="###";
基本的menuArr[1]与menuArr[2]用类输出
options.add(new Option( "-----请选择-----",""));
add(new Option("text","value"))用法
js生成的value值为top1中的名字,有些用id,有些用文字,在结合
数据库select的可行性的原则下修改
sub top1
SQL="select *
From ty
PE2"
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 * f
rom type2"
rs.open sql,conn,1,1
while not rs.eof
response.write (rs("p_type2")&
amp;"|||")
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.reco
rdset")
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实现无限级分类的方法js版全部内容,希望文章能够帮你解决asp实现无限级分类的方法js版所遇到的问题。
如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。