首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

网页奇效|Linkweb.cn/Js|-树形导航菜单

2012-10-19 
网页特效|Linkweb.cn/Js|---树形导航菜单htmlheadtitle网页特效|Linkweb.cn/Js|---树形导航菜单/ti

网页特效|Linkweb.cn/Js|---树形导航菜单
<html>
<head>
<title>网页特效|Linkweb.cn/Js|---树形导航菜单</title>
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 4px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
--></style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript1.2">
scores = new Array(20);
var numTotal=0;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";        }    }}
function expandIt(el) {if (!ver4) return;    if (IE4) {        whichEl1 = eval(el + "Child");for(i=1;i<=numTotal;i++){whichEl = eval(scores[i] + "Child");
if(whichEl!=whichEl1) {whichEl.style.display = "none";}}        whichEl1 = eval(el + "Child");    
   if (whichEl1.style.display == "none") {            whichEl1.style.display = "block";        }        else {            whichEl1.style.display = "none";        }    }  
else {        whichEl = eval("document." + el + "Child");for(i=1;i<=numTotal;i++){whichEl = eval("document." + scores[i] + "Child");
if(whichEl!=whichEl1) {whichEl.visibility = "hide";}}        if (whichEl.visibility == "hide") {      
     whichEl.visibility = "show";        }        else {            whichEl.visibility = "hide";        }        arrange();    }}onload = initIt;
</script>
</head>
<body>

<center>
<table border=1 bordercolor=#000000 borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0">
<tr><td align=center><font size=4 color=red face="幼圆">
  <strong style="font-weight: 400">下面为脚本显示区</strong></font></td></tr><tr><td align=left>
<div id='KB1Parent' class='parent'><a href="#" onClick="expandIt('KB1'); return false">
<IMG SRC='images/plus.gif' BORDER=0 width="25" height="16">精彩链接</a></div><div id='KB1Child' class='child'>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">我的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">我的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">我的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">我的链接</a></div>
<div id='KB2Parent' class='parent'><a href="#" onClick="expandIt('KB2'); return false">
<IMG SRC='images/plus.gif' BORDER=0 width="25" height="16">经典网站</a></div><div id='KB2Child' class='child'>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">你的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">你的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">你的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">你的链接</a>
</div>
<div id='KB3Parent' class='parent'><a href="#" onClick="expandIt('KB3'); return false">
<IMG SRC='images/plus.gif' BORDER=0 width="25" height="16">音乐欣赏</a></div><div id='KB3Child' class='child'>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">他的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">他的链接</a><br>
<a href='#' target='_target'> <IMG SRC='images/blank.gif' BORDER=0 width="15" height="15">他的链接</a></div>

  <SCRIPT>numTotal=3;scores[1]='KB1';scores[2]='KB1';scores[3]='KB2';</SCRIPT>
</td></tr></table></center>
<br>
<br>
<center>
<SCRIPT LANGUAGE="JavaScript">

<!-- hide

function goHist(a)

{

   history.go(a);

}

//-->

</script></center>

</body>
</html>

热点排行