asp实现无限级分类的方法js版
网络编程 2021-07-05 10:58www.168986.cn编程入门
MenuArr=new Array()
MenuLenArr=new Array()
SubMenuArr=new Array()
MenuIdArr=new Array()
MenuArr[1]="<%call 11%>" //洲名|||...
MenuArr[2]="<%call 1%>" //洲名###国名|||...
MenuIdArr[1]="zhou"
MenuIdArr[2]="author"
MenuClass=2 //4级菜单
splitchar1="|||";
splitchar2="###";
MenuLenArr=new Array()
SubMenuArr=new Array()
MenuIdArr=new Array()
MenuArr[1]="<%call 11%>" //洲名|||...
MenuArr[2]="<%call 1%>" //洲名###国名|||...
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值为1中的名字,有些用id,有些用文字,在结合数据库select的可行性的原则下修改
sub 1
sql="select * from type2"
rs.open sql,conn,1,1
while not rs.eof
a=rs("id2")
b=rs("p_type2")
call 2(a,a)
rs.movenext
wend
rs.close
end sub
sub 11
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 2 (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
%>
sql="select * from type2"
rs.open sql,conn,1,1
while not rs.eof
a=rs("id2")
b=rs("p_type2")
call 2(a,a)
rs.movenext
wend
rs.close
end sub
sub 11
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 2 (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注入代码
编程语言
- 机械手焊接机器人编程 机械手焊接设备编程
- vb数据库编程实例,vb做数据库
- tiobe世界编程语言排行榜,全球编程语言排行
- 成都java编程培训 成都it编程培训中心
- 编程基础培训,编程基础知识培训
- flash游戏编程基础教程,flash游戏开发教程
- 不会英语能学编程吗 不会英语可以学程序员吗
- 爱心代码编程C语言 爱心代码编程c语言公式
- c语言编程学习入门 c语言编程快速入门
- 西门子plc编程培训 西门子plc编程培训班
- 哪里可以学编程 台州哪里可以学编程
- 少儿编程哪个好 少儿编程哪个品牌好
- 编程是什么意思,图形编程是什么意思
- c语言编程软件下载,c语言编程软件在哪下载
- java编程软件下载,java编程下载手机版
- ug编程培训学校,ug编程培训教程