国产一级一区二区_segui88久久综合9999_97久久夜色精品国产_欧美色网一区二区

掃一掃
關注微信公眾號

ASP中生成靜態頁面技術
2007-03-07   網絡

<%
dim str
function menu(id)
set rs=server.CreateObject("adodb.recordset")
sql="select * from menu where id1="&id&" order by url,id"
rs.open sql,conn,1,1
str=str+"<table border=´0´ cellspacing=´0´ cellpadding=´0´>"+chr(13)
i=1
while not rs.eof
ChildCount=conn.execute("select count(*) from menu where id1="&rs("id"))(0)
if ChildCount=0 then
if i=rs.recordcount then
menutype="file1"
else
menutype="file"
end if
menuname="<a href=´"&rs("url")&"´ target=´_blank´>"&rs("menuname")&"</a>"
onmouseup=""
else
if i=rs.recordcount then
menutype="menu3"
listtype="list1"
onmouseup=" onMouseUp=change1(´a"&rs("id")&"´,´b"&rs("id")&"´);"
else
menutype="menu1"
listtype="list"
onmouseup=" onMouseUp=change2(´a"&rs("id")&"´,´b"&rs("id")&"´);"
end if
menuname=rs("menuname")
end if
str=str+"<tr><td id=´b"&rs("id")&"´ class=´"&menutype&"´"&onmouseup&">"&menuname&"</td></tr>"+chr(13)
if ChildCount>0 then
str=str+"<tr id=´a"&rs("id")&"´ style=´display:none´><td class=´"&listtype&"´>"+chr(13)
menu(rs("id"))
str=str+"</td></tr>"+chr(13)
end if
rs.movenext
i=i+1
wend
str=str+"</table>"+chr(13)
rs.close
set rs=nothing
end function

menu(0)

set fso=server.CreateObject("scripting.filesystemobject")
set f1=fso.opentextfile(server.MapPath("demo.htm"),2,true)
f1.write("<!DOCTYPE HTML PUBLIC ´-//W3C//DTD HTML 4.01 Transitional//EN´ ´http://www.w3.org/TR/html4/loose.dtd´>")
f1.write("<html>")
f1.write("<head>")
f1.write("<meta http-equiv=´Content-Type´ content=´text/html; charset=gb2312´>")
f1.write("<title>哈哈~~~!這回速度超快了吧?</title>")
f1.write("<meta name=´keywords´ content=´asp2004,樹,菜單,無限級´>")
f1.write("<meta name=´author´ content=´小灰,quxiaohui_0@163.com´>")
f1.write("<link href=´style.css´ rel=´stylesheet´ type=´text/css´>")
f1.write("<script language=´javascript´ src=´function.js´></script>")
f1.write("</head>")
f1.write("<body>")
f1.write("<a href=´http://asp2004.net´ target=´_blank´>http://asp2004.net</a>提供最新下載《<a href=´menu.asp´>管理</a>》<br>")

f1.write(str)

f1.write("</body>")
f1.write("</html>")
f1.close
set fso=nothing

response.Redirect("demo.htm")
%>

熱詞搜索:

上一篇:系統管理和設備管理
下一篇:湖北電力的選擇

分享到: 收藏
主站蜘蛛池模板: 庆安县| 赤壁市| 克东县| 汝州市| 巫溪县| 濮阳县| 瑞丽市| 株洲市| 巢湖市| 沧州市| 龙岩市| 河间市| 桓台县| 富宁县| 白山市| 永善县| 达尔| 英山县| 天峨县| 南京市| 泰安市| 砚山县| 阳朔县| 临沧市| 鲁山县| 聊城市| 阜城县| 扎赉特旗| 色达县| 湘乡市| 无锡市| 瑞丽市| 托克托县| 鞍山市| 马尔康县| 长阳| 云龙县| 准格尔旗| 城固县| 德州市| 长岛县|