午夜国产狂喷潮在线观看|国产AⅤ精品一区二区久久|中文字幕AV中文字幕|国产看片高清在线

    JS編寫樹型結(jié)構(gòu)菜單
    來源:易賢網(wǎng) 閱讀:810 次 日期:2015-04-27 10:45:16
    溫馨提示:易賢網(wǎng)小編為您整理了“JS編寫樹型結(jié)構(gòu)菜單”,方便廣大網(wǎng)友查閱!

    <script language="JavaScript">

    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;

    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;

    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;

    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";

    }

    }

    }

    function expandIt(el) {

    if (!ver4) return;

    if (IE4) {

    whichEl = eval(el + "Child");

    if (whichEl.style.display == "none") {

    whichEl.style.display = "block";

    }

    else {

    whichEl.style.display = "none";

    }

    }

    else {

    whichEl = eval("document." + el + "Child");

    if (whichEl.visibility == "hide") {

    whichEl.visibility = "show";

    }

    else {

    whichEl.visibility = "hide";

    }

    arrange();

    }

    }

    onload = initIt;

    </script>

    <div id="KB1Parent" class="parent"><a href="#"KB1"); return false" ><img src="img/plus.gif" border=0>文件夾一</a></div>

    <div id="KB1Child" class="child">

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt=""><img src="img/open.gif" border=0>頁面一</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt="" width="15" height="11"><img src="img/open.gif" border=0>頁面二</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt="" width="15" height="11"><img src="img/open.gif" border=0>頁面三</a>

    </div>

    <div id="KB2Parent" class="parent">

    <a href="#"KB2"); return false" ><img src="img/plus.gif" border=0>文件夾二</a>

    </div>

    <div id="KB2Child" class="child"> 

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt="" width="15" height="11"><img src="img/open.gif" border=0>頁面一</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt=""><img src="img/open.gif" border=0>頁面二</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt="" width="15" height="11"><img src="img/open.gif" border=0>頁面三</a>

    </div>

    <div id="KB3Parent" class="parent">

    <a href="#"KB3"); return false" ><img src="img/plus.gif" border=0>文件夾三</a>

    </div>

    <div id="KB3Child" class="child">  

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt=""><img src="img/open.gif" border=0>頁面一</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/open.gif" border=0>頁面二</a><br>

    <a href="sample.htm" target="_blank" ><img src="img/spacer.gif" border=0 alt=""><img src="img/open.gif" border=0>頁面三</a>

    </div>

    <script language="JavaScript">

    if (NS4) {

    firstEl = "KB1Parent";

    firstInd = getIndex(firstEl);

    arrange();

    }

    </script>

    更多信息請查看IT技術(shù)專欄

    更多信息請查看腳本欄目
    易賢網(wǎng)手機網(wǎng)站地址:JS編寫樹型結(jié)構(gòu)菜單
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

    2025國考·省考課程試聽報名

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號
    云南網(wǎng)警備案專用圖標(biāo)
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報警專用圖標(biāo)