欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

三层动态下拉菜单的例子

程序员文章站 2022-08-04 15:47:15
写了一个三层动态读取文件夹的下拉菜单的例子,供大家参考!<%得到文件夹路径。注意设置文件名字urlpath=server.mappath("ook")set fsobrowse=create...
写了一个三层动态读取文件夹的下拉菜单的例子,供大家参考!
<%
得到文件夹路径。注意设置文件名字
urlpath=server.mappath("ook")
set fsobrowse=createobject("scripting.filesystemobject")

设置文件夹路径
if request("path")="" then
lpath=urlpath&""
else
lpath=request("path")&""
end if
%>

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta http-equiv=pragma content=no-cache>
<title>中国国际航空公司</title>
<link rel="stylesheet" href="news.css">

<script language="javascript1.2">
ns4 = (document.layers) ? 1 : 0;
ie4 = (document.all) ? 1 : 0;
ver4 = (ns4 || ie4) ? 1 : 0;

if (ver4) {
    with (document) {
        write("<style type=text/css>");
        if (ns4) {
            write(".parent {position:absolute; visibility:visible}");
            write(".child {position:absolute; visibility:visible}");
            write(".regular {position:absolute; visibility:visible}")
        }
        else {
            write(".child {display:none}")
        }
        write("</style>");
    }
}

function getindex(el) {
    ind = null;
    for (i=0; i<document.layers.length; i++) {
        whichel = document.layers[i];
        if (whichel.id == el) {
            ind = i;
            break;
        }
    }
    return ind;
}

function arrange() {
    nexty = document.layers[firstind].pagey +document.layers[firstind].document.height;
    for (i=firstind+1; i<document.layers.length; i++) {
        whichel = document.layers[i];
        if (whichel.visibility != "hide") {
            whichel.pagey = nexty;
            nexty += whichel.document.height;
        }
    }
}

function initit(){
    if (!ver4) return;
    if (ns4) {
        for (i=0; i<document.layers.length; i++) {
            whichel = document.layers[i];
            if (whichel.id.indexof("child") != -1) whichel.visibility = "hide";