以前做过,不过不小心弄丢了。我这里有一个分级浏览服务器目录的页面,给你参考一下吧<% @language = "VBScript" %>
<html>
<head>
<title>服务器文件列表</title>
<link rel="stylesheet" type="text/css" href="admin.css"/>
</head>
<%
' -- 显示文件列表
perrow = 5
path = request("path")
if path = "" then
path = "/"
end if
%>
<body topmargin="0" leftmargin="0" oncontextmenu="return false" onclick="hidemenu()">
<input id="path" value="<%=path%>" type="hidden">
<table cellspacing="0" cellpadding="2" border="0" width="750" align="left">
<%
set fso = server.createobject("scripting.filesystemobject")
set fld = fso.getfolder(server.mappath(path))
set sfc = fld.subfolders

thisFolder = request.servervariables("path_info")

parent = INSTRREV(path,"/")
parent = LEFT(path,parent - 1)

str = ""
str = str & "<tr><td colspan='" & perrow & "'><a class='folder' href='" & thisFolder & "?path=" & parent &"'><font face='webdings'>5</font>上一级目录</a></td></tr>"
if path = "/" then path = "" n = 0
for each i in sfc
if n = 0 then
str = str & "<tr>"
end if
str = str & "<td width='" & (100 / perrow * 750) & "'><img src='images/folder.gif'>&nbsp;<a class='folder' href=""" & myself & "?path=" & path & "/" & i.name & """>" & i.name & "</a></td>"
if n = perrow - 1 then
str = str & "</tr>"
end if
n = n + 1

if n = perrow then
n = 0
end if
next set fc= fld.files


for each i in fc
if n = 0 then
str = str & "<tr>"
end if

str=str & "<td width='" & (100 / perrow * 750) & "'><img src='images/file.gif'>&nbsp;<a class='file' href='" & path & "/" & i.name & "' oncontextmenu='menu(this)'>" & i.name & "</a></td>"

if n = perrow - 1 then
str = str & "</tr>"
end if
n = n + 1

if n = perrow then
n = 0
end if
next
response.write str
%>
</table><div id="menu" style="position:absolute;left:0px;top:0px;visibility:hidden">
<input id="para" value="" type="hidden">
<table cellpadding="2" cellspacing="0" border="0" class="menu" width="75">
<tr height="20">
<td id="item" onclick="onItem(1)" onmouseover="highlightMenu(this)" style="cursor:hand">&nbsp;<img src="images/download.gif" align="absmiddle">&nbsp;保 存</td>
</tr>
<tr height="1" bgcolor="lightgrey">
<td></td>
</tr>
<tr height="20">
<td id="item" onclick="onItem(2)" onmouseover="highlightMenu(this)" style="cursor:hand">&nbsp;<img src="images/delete.gif" align="absmiddle">&nbsp;删 除</td>
</tr>
</table>
</div>
</body><script language="javascript">
<!--
function menu(ob){
var rightedge = document.body.clientWidth - event.clientX;
var bottomedge = document.body.clientHeight - event.clientY;     if (rightedge < document.all("menu").offsetWidth)    
document.all("menu").style.left = document.body.scrollLeft + event.clientX - document.all("menu").offsetWidth;
else    
document.all("menu").style.left = document.body.scrollLeft + event.clientX;

if (bottomedge > document.all("menu").offsetHeight)    
document.all("menu").style.top = document.body.scrollTop + event.clientY; // - document.all("menu").offsetHeight    
else
document.all("menu").style.top = document.body.scrollTop + event.clientY;
document.all("menu").style.visibility = "visible";
document.all("menu").all("para").value = ob.innerText;
return false;
}

function hidemenu(){    
document.all("menu").style.visibility = "hidden";   
}

function highlightMenu(ob){
var itemID = ob.id;

if (document.all(itemID).length == null)
len = 0;
else
len = document.all(itemID).length;

for (var i = 0;i < len;i++)
document.all(itemID)[i].style.backgroundColor = "transparent";
ob.style.backgroundColor = "lightblue";
}

function onItem(i){
var para = document.all("menu").all("para").value;
switch(i){
case 1:
if (para == "undefined")
return;
location.assign("SaveFile.asp?path=<%=path%>&fn=" + para);
break;
case 2:
if (para == "undefined")
return;

if (confirm("确定要删除文件:" + para + "?"))
location.assign("DelFile.asp?path=<%=path%>&fn=" + para);
break;
default:break;
}
}
-->
</script>
</html>