中文(繁体)
<style type="text/css"> .mainDiv { width:160px; } .topItem { 寬度:160px;高度:22px;遊標:指針;背景:#467BF2;文字裝飾:無;顏色: 白色;字體粗細:粗體;字體系列:「哥德式」; } .dropMenu { 背景:#D9D9D9;頂部邊框:1px實心#467BF2;左邊框:1px實心#92B1F8;右邊框:1px實心#92B1F8;邊框底部:1px實心#92B1F8; } .subMenu { 顯示:無; } .subItem { padding-left:5px;遊標:指針;字體粗細:粗體;文字裝飾:無;顏色:黑色; } .subItem a { 文字裝飾:無;顏色:黑色; } .subItemOver { 遊標:指標;顏色:藍色;文字裝飾:底線;字體粗細:粗體;左內邊距:5px; } .subItemOver a { 顏色:藍色; } .drop { 左邊框:1px 純黑;右邊框:1px 純黑; } </style> <script language="JavaScript"> var TIMER_SLIDE = null; var OBJ_SLIDE; var OBJ_VIEW; var PIX_SLIDE = 10; //這是投影片的數量/DELAY_SLIDE var NEW_PIX_VAL;變數 DELAY_SLIDE = 30; //這是每次呼叫投影片之間的時間 var DIV_HEIGHT = 22; //值無關 var SUB_MENU_NUM =0; var RE_INIT_OBJ = null; var bMenu = document.getElementById("curMenu"); var MainDiv,SubDiv //DD 新增程式碼 document.write('<div id="tempcontainer" class="mainDiv" style="visibility: hide;position:absolute"></div>') function Init(objDiv) { if (TIMER_SLIDE == null) { SUB_MENU_NUM = 0; MainDiv = objDiv.parentNode; SubDiv = MainDiv.getElementsByTagName("DIV").item(0); SubDiv.onclick = SetSlide; OBJ_SLIDE = MainDiv.getElementsByTagName("DIV").item(1) OBJ_VIEW = OBJ_SLIDE.getElementsByTagName("DIV").item(0); document.getElementById("tempcontainer").innerHTML=MainDiv.getElementsByTagName("DIV").item(2).innerHTML //DD 新增程式碼 DIV_HEIGHT=document.getElementById("tempcontainer")。 i=0;i<OBJ_VIEW.childNodes.length;i++) { if (OBJ_VIEW.childNodes.item(i).tagName == "SPAN") { SUB_MENU_NUM ++; OBJ_VIEW.childNodes.item(i).onmouseover= ChangeStyle; OBJ_VIEW.childNodes.item(i).onmouseout=ChangeStyle; NEW_PIX_VAL = parseInt(MainDiv.getAttribute("state")); } } function SetSlide() { if (window.TIMER_SLIDE) clearInterval(TIMER_SLIDE) //DD 新增程式碼 if (TIMER_SLIDE == null && this.parentNode == MainDiv) TIMER_SLIDE = setInterval('RunSlide(SL), DELSlide 是否則 { RE_INIT_OBJ = this; setTimeout('ReInit()', 200); } } 函數 ReInit(obj) { 初始化(RE_INIT_OBJ); TIMER_SLIDE = setInterval('RunSlide()', DELAY_SLIDE); RE_INIT_OBJ = 空; } 函數 RunSlide() { if (OBJ_VIEW.getAttribute("state") == 0) { NEW_PIX_VAL += PIX_SLIDE; OBJ_SLIDE.style.height = NEW_PIX_VAL; if (NEW_PIX_VAL >= DIV_HEIGHT) //DD 修改程式碼 {clearInterval(TIMER_SLIDE); TIMER_SLIDE = 空; OBJ_VIEW.style.display = '內聯'; OBJ_VIEW.setAttribute("狀態","1") MainDiv.setAttribute("狀態",NEW_PIX_VAL); } } else { OBJ_VIEW.style.display = '無'; NEW_PIX_VAL -= PIX_SLIDE; if(NEW_PIX_VAL > 0)OBJ_SLIDE.style.height = NEW_PIX_VAL;如果(NEW_PIX_VAL <= 0){ NEW_PIX_VAL = 0; OBJ_SLIDE.style.height = NEW_PIX_VAL 清除間隔(TIMER_SLIDE); TIMER_SLIDE = 空; OBJ_VIEW.setAttribute("狀態","0") MainDiv.setAttribute("狀態",NEW_PIX_VAL); } } } function ChangeStyle() { if (this.className == this.getAttribute("classOut")) this.className = this.getAttribute("classOver");否則 this.className = this.getAttribute("classOut"); } </script> <!--------開始功能表----------> <div class="mainDiv" state="0"> <div class="topItem" classOut= “topItem”classOver=“topItemOver”onMouseOver=“Init(這個);” >網頁特效</div> <div class="dropMenu" > <div class="subMenu" state="0"> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href= "http://www.downcodes.com/">圖形圖片</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href=" http://www.downcodes.com/">滑鼠事件</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http ://www.downcodes.com/">時間日期</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http: //www.downcodes.com/">導航選單</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http:/ / /www.downcodes.com/">文字效果</a></span> </div> </div> </div> <!--------結束選單----- - --> <BR /> <!--------開始功能表----------> <div class="mainDiv" state="0"> <div class="topItem " classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" > 網路學院</div> <div class="dropMenu" > <div class="subMenu" state="0"> <span class = "subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com/">網頁製作</a></span><BR /> <span class= " subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com/">網路程式設計</a></span><BR /> <span class=" subItem " classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com/">圖形圖片</a></span> </div> </div> </ div > <!--------結束選單----------> <BR /> <!--------開始選單------ -> <div class="mainDiv" state="0"> <div class="topItem" classOut="topItem" classOver="topItemOver" onMouseOver="Init(this)" >網站聯盟</div> <div class ="dropMenu" > <div class="subMenu" state="0"> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com /">網頁設計</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com/ ">藝術創作</a></span><BR /> <span class="subItem" classOut="subItem" classOver="subItemOver"><a href="http://www.downcodes.com/" >電腦網路< /a></span> </div> </div> </div> <!--------結束選單---------->