| 网站首页 | 硬件维修 | 应用学院 | 网络组建 | 网站制作 | 菜鸟黑客 | 编程之道 | 数码大全 | 娱乐休闲 | 软件下载 | 在线视频 | 请您留言 | 技术论坛 | 
专 题 栏 目
最 新 热 门
最 新 推 荐
相 关 文 章
  • javascript模拟游戏中的…

  • javascript设计网页中的…

  • 一个简单的javascript菜…

  • 一个很通用的javascript…

  • javascript+xml实现二级…

  • 在网页里做类似window右键的…

  • 基于Web标准的UI组件 — 菜单…

  • 几个对图形进行动态处理的dh…

  • 实现网页的动态过渡效果

  • 使用Web标准建站第11天:不用…

  • Q
    您现在的位置: 我是IT人 >> 网站制作 >> ASP >> 文章正文
    三层动态下来菜单的例子,供大家参考         
    三层动态下来菜单的例子,供大家参考
    作者:网络 文章来源:转载 点击数: 更新时间:2005-9-30
    [ 字体:缩小 正常 放大 | 双击自动滚屏 ]
    请选择合适的字体颜色:


    写了一个三层动态读取文件夹的下拉菜单的例子,供大家参考!
    <%
    '得到文件夹路径。注意设置文件名字
    urlpath=server.mappath("\book")
    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";
    }
    arrange();
    }
    else {
    divColl = document.all.tags("DIV");
    for (i=0; i<divColl.length; i++) {
    whichEl = divColl(i);
    if (whichEl.className == "child") whichEl.style.display = "none";
    }
    }
    }

    [1] [2] [3] 下一页  

    文章录入:小秦    责任编辑:小秦 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    | 设为首页 | 加入收藏 | 联系站长 | 关于我们 | 友情链接 | 版权申明 |