Infinite-level directory tree implemented by ASP + Access

zhaozj2021-02-16  59

Demo: http://asp2004.net/temp/treemenu/

Download address: http://asp2004.net/temp/treeMenu.rar

Key code:

<% set conn = server.createObject ("adoDb.connection") connStr = "dbq =" server.mappath ("db1.mdb") "; defaultdir =; driver = {Microsoft Access Driver (* .mdb)} "Conn.open connStrfunction menu (id) SET RS = Server.createObject (" AdoDb.Recordset ") SQL =" SELECT * from menu where id1 = "& id" r r r r r r s r r r = "r o en s , 1IF = 0 dam.close set = Nothing exit functionEND iFRESPONSE.WRIT FUNCTIONEND IFRESPONSE.WRITE ("

) i = 1WHILE NOT RS.EOFIF LEN (RS ("URL"))> 0 Then if i = r. = "file1" else menutype = "file" end if Menuname = " "&" "" "" οnmοuseup = "" "Else if i = r. =" οnmοuseup = "οnmοuseup =" = "οnmοuseup =" with (EVAL ('id) "& RS (" ID ") &" '))) {style.display =' None '; this.classname =' menu3 ';} else {style.display ='; THIS .classname = 'menu4';} "else menutype =" οnmοusepe = "" οnmοuseup = "with (EVAL ('ID") & ")) IF (Style.Display ==' ) {style.display = 'none; this.classname = 'menu1';} else {style.display = '; this.classname =' menu2 ';} "end if Menuname = RS (" Menuname ") end if%>
" Style = "Display: None">