<TABLE cellSpacing=0 cellPadding=0 width="90%" align=center border=0>
<TBODY>
<TR>
<TD style="WORD-BREAK: break-all"><!--#include file="conn.asp"--> <BR><% <BR>dim str <BR>function menu(id) <BR>set rs=server.CreateObject("adodb.recordset") <BR>sql="select * from menu where id1="&id&" order by url,id" <BR>rs.open sql,conn,1,1 <BR>str=str+"<table border='0' cellspacing='0' cellpadding='0'>"+chr(13) <BR>i=1 <BR>while not rs.eof <BR>ChildCount=conn.execute("select count(*) from menu where id1="&rs("id"))(0) <BR>if ChildCount=0 then <BR>if i=rs.recordcount then <BR>menutype="file1" <BR>else <BR>menutype="file" <BR>end if <BR>menuname="<a href='"&rs("url")&"' target='_blank'>"&rs("menuname")&"</a>" <BR>onmouseup="" <BR>else <BR>if i=rs.recordcount then <BR>menutype="menu3" <BR>listtype="list1" <BR>onmouseup=" onMouseUp=change1('a"&rs("id")&"','b"&rs("id")&"');" <BR>else <BR>menutype="menu1" <BR>listtype="list" <BR>onmouseup=" onMouseUp=change2('a"&rs("id")&"','b"&rs("id")&"');" <BR>end if <BR>menuname=rs("menuname") <BR>end if <BR>str=str+"<tr><td id='b"&rs("id")&"' class='"&menutype&"'"&onmouseup&">"&menuname&"</td></tr>"+chr(13) <BR>if ChildCount>0 then <BR>str=str+"<tr id='a"&rs("id")&"' style='display:none'><td class='"&listtype&"'>"+chr(13) <BR>menu(rs("id")) <BR>str=str+"</td></tr>"+chr(13) <BR>end if <BR>rs.movenext <BR>i=i+1 <BR>wend <BR>str=str+"</table>"+chr(13) <BR>rs.close <BR>set rs=nothing <BR>end function
<P></P>
<P>menu(0) </P>
<P>set fso=server.CreateObject("scripting.filesystemobject") <BR>set f1=fso.opentextfile(server.MapPath("demo.htm"),2,true) <BR>f1.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' <A href="http://www.w3.org/TR/html4/loose.dtd'%3E" target=_blank><FONT color=#0000ff>http://www.w3.org/TR/html4/loose.dtd'></FONT></A>;") <BR>f1.write("<html>") <BR>f1.write("<head>") <BR>f1.write("<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>") <BR>f1.write("<title>哈哈~~~!这回速度超快了吧?</title>") <BR>f1.write("<meta name='keywords' content='asp2004,树,菜单,无限级'>") <BR>f1.write("<meta name='author' content='小灰,quxiaohui_0@163.com'>") <BR>f1.write("<link href='style.css' rel='stylesheet' type='text/css'>") <BR>f1.write("<script language='javascript' src='function.js'></script>") <BR>f1.write("</head>") <BR>f1.write("<body>") <BR>f1.write("<a href=<A href="http://asp2004.net'" target=_blank><FONT color=#0000ff>http://asp2004.net'</FONT></A> target='_blank'><A href="http://asp2004.net%3c/" target=_blank><FONT color=#0000ff>http://asp2004.net<</FONT></A>;/a>提供最新下载《<a href='menu.asp'>管理</a>》<br>") </P>
<P>f1.write(str) </P>
<P>f1.write("</body>") <BR>f1.write("</html>") <BR>f1.close <BR>set fso=nothing </P>
<P>response.Redirect("demo.htm") <BR>%> <BR></P></TD></TR></TBODY></TABLE>
|