複製程式碼 程式碼如下: 树形导航菜单 <br><!-- <BR>.parent{ width:200px; height:30px; font-size:14px; line-height:30px;} <BR>.child{ width:200px; height:auto; font-size:12px; line-height:20px;} <BR>--> <br> <br>scores = new Array(20);var numTotal=0;NS4 = (document.layers) ? 1 : 0;IE4 = (document.all) ? 1 : 0;ver4 = (NS4 || IE4) ? 1 : 0;if (ver4) { <br>with (document) { <br>write("<STYLE TYPE='text/css'>"); <br>if (NS4) { <br>write(".parent {position:absolute; visibility:visible}"); <br>write(".child {position:absolute; visibility:visible}"); <br>write(".regular {position:absolute; visibility:visible}") <br>} <br>else { <br>write(".child {display:none}") <br>} write("</STYLE>"); <br>}}function getIndex(el) { <br>ind = null; <br>for (I=0; I<document.layers.length; I++) { <BR>whichEl = document.layers[I]; <BR>if (whichEl.id == el) { <BR>ind = I; <BR>break; <BR>} <BR>} <BR>return ind;}function arrange() { <BR>nextY = document.layers[firstInd].pageY +document.layers[firstInd].document.height; <BR>for (I=firstInd+1; I<document.layers.length; I++) { <BR>whichEl = document.layers[I]; <BR>if (whichEl.visibility != "hide") { <BR>whichEl.pageY = nextY; <BR>nextY += whichEl.document.height; <BR>} <BR>}}function initIt(){ <BR>if (!ver4) return; <BR>if (NS4) { <BR>for (I=0; I<document.layers.length; I++) { <BR>whichEl = document.layers[I]; <BR>if (whichEl.id.indexOf("C") != -1) whichEl.visibility = "hide"; <BR>} <BR>arrange(); <BR>} <BR>else { <BR>divColl = document.all.tags("DIV"); <BR>for (I=0; I<divColl.length; I++) { <BR>whichEl = divColl(I); <BR>if (whichEl.className == "child") whichEl.style.display = "none"; <BR>} }}function expandIt(el) { <BR>if (!ver4) return; if (IE4) { <BR>whichEl1 = eval(el + "C"); <BR>for(I=1;I<=numTotal;I++){ <BR>whichEl = eval(scores[I] + "C"); <BR>if(whichEl!=whichEl1) { <BR>whichEl.style.display = "none"; <BR>} <BR>} <BR>whichEl1 = eval(el + "C"); <BR>if (whichEl1.style.display == "none") { <BR>whichEl1.style.display = "block"; <BR>} <BR>else { <BR>whichEl1.style.display = "none"; <BR>} <BR>} <BR>else { <BR>whichEl = eval("document." + el + "C"); <BR>for(I=1;I<=numTotal;I++){ <BR>whichEl = eval("document." + scores[I] + "C"); <BR>if(whichEl!=whichEl1) { <BR>whichEl.visibility = "hide"; <BR>} <BR>} <BR>if (whichEl.visibility == "hide") { <BR>whichEl.visibility = "show"; <BR>} <BR>else { <BR>whichEl.visibility = "hide"; <BR>} <BR>arrange(); <BR>}}onload = initIt; <BR> +时间日期类 +任意位置显示时钟 +倒计时代码生成器 -八种风格时间显示 -全中文日期显示 +页面导航类 -显示站点信息导航 -友情链接导航框 -目录式导航菜单 -重要信息说明脚本 +页面背景类 -背景向下移动 -背景不停变换色彩 -页面转换特效 +页面特效类 -字符从空中掉下来 -鼠标响应文字变色 +图形图象类 -禁止图片下载 -图形选择脚本 -图片翻滚导航 -图片翻滚导航 +按钮特效类 -跑马灯式链接说明 -按顺序点击链接 +鼠标事件类 -图片跟随鼠标 -禁用右键自动导航 -鼠标激活警告框 +Cookie脚本 -随登陆次数变提示 -检测IE去过站点 -离开时显示信息 -弹出窗口自动关闭 -离开页面弹出窗口 -进入时显示信息 +文本特效类 -随机信息显示 -文字颜色渐变脚本 -文本自动输出 +状态栏特效 -状态栏跑马灯脚本 -文字从右弹出 -title变化弹出 +密 码 类 -控制他人進入頁面 用來實現會員制度 -密碼保護對應頁面 -自己編密碼表 綜合類別 -加密頁面原始碼 -存取時間限制 -搜尋引擎登記 -下載記時器腳本 遊戲類別 -一款流行遊戲 <BR>numTotal=14; <BR>scores[1]='KB1'; <BR>scores[2]= 'KB1'; <BR>scores[3]='KB2'; <BR>scores[4]='KB3'; <BR>scores[5]='KB4'; <BR>scores[6]='KB5 '; <BR>scores[7]='KB6'; <BR>scores[8]='KB7'; <BR>scores[9]='KB8'; <BR>scores[10]='KB9'; <BR>scores[11]='KB10'; <BR>scores[12]='KB11'; <BR>scores[13]='KB12'; <BR>scores[14]='KB13'; <BR>