指引网

当前位置: 主页 > 编程开发 > ASP >

列出指定目录下的所有文件和目录

来源:网络 作者:佚名 点击: 时间:2017-06-22 20:46
[摘要] %@ LANGUAGE = VBScript % %Server.ScriptTimeout=5000% html head style TYPE=text/css /* Outline Style Sheet */ UL UL {display: none; margin-left: 20pt} /style script LANGUAGE=JavaScript function checkParent(src, dest) { // Search for a specif
<%@ LANGUAGE = VBScript %>
<%Server.ScriptTimeout=5000%>
<html>
<head>
<style TYPE="text/css">
/* Outline Style Sheet */
UL UL {display: none;
margin-left: 20pt}
</style>
<script LANGUAGE="JavaScript">
function checkParent(src, dest) {
// Search for a specific parent of the current element
while (src!=null) {
if (src.tagName == dest) return src;
src = src.parentElement;
}
return null;
}
function outline() {
// Expand or collapse if a list item is clicked.
var open = event.srcElement;
// Make sure clicked inside an LI. This test allows rich HTML inside lists.
var el = checkParent(open, "LI");
if (null!=el) {
var pos = 0;
// Search for a nested list
for (var pos=0; pos<el.children.length; pos++) {
if ("UL"==el.children[pos].tagName) break;
}
if (pos==el.children.length) return;
} else return;
el = el.children[pos];
if ("UL"==el.tagName) {
// Expand or Collapse nested list
if (""==el.style.display) {
el.style.display = "block";
el.style.listStyleImage = "url(images/folder.gif)";
el.parentElement.style.listStyleImage = "url(images/ofolder.gif)";
}
else
{
el.style.display = "";
el.parentElement.style.listStyleImage = "url(images/folder.gif)";
}
}
event.cancelBubble = true;
------分隔线----------------------------