六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

樹型菜單-用JS編寫

[摘要]這個(gè)樹型菜單的代碼簡單一點(diǎn)。 <script language="JavaScript"> NS4 = (document.layers) ? 1 : 0; IE4 = (document.all) ? 1 : 0; ver4 = (NS4 IE4) ? 1 : ...

這個(gè)樹型菜單的代碼簡單一點(diǎn)。
<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[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) {
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>
</font></p>
<div id="KB1Parent" class="parent"><a href="#" onClick="expandIt('KB1'); return false" ><img

src="http://www.okasp.com/techinfo/img/plus.gif" border=0>文件夾一</a></div>
<div id="KB1Child" class="child"><a href="sample.htm" target="_blank" ><img

src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫'><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面一</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫' width="15"

height="11"><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面二</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫' width="15"

height="11"><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面三</a></div>
<div id="KB2Parent" class="parent"><a href="#" onClick="expandIt('KB2'); return false" ><img

src="http://www.okasp.com/techinfo/img/plus.gif" border=0>文件夾二</a></div>
<div id="KB2Child" class="child"><a href="sample.htm" target="_blank" ><img

src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫' width="15" height="11"><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面一</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫'><img

src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面二</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫' width="15"

height="11"><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面三</a></div>
<div id="KB3Parent" class="parent"><a href="#" onClick="expandIt('KB3'); return false" ><img

src="http://www.okasp.com/techinfo/img/plus.gif" border=0>文件夾三</a></div>
<div id="KB3Child" class="child"> <a href="sample.htm" target="_blank" ><img

src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫'><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面一</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面二</a><br>
<a href="sample.htm" target="_blank" ><img src="http://www.okasp.com/techinfo/img/spacer.gif" border=0 alt='樹型菜單-用JS編寫'><img

src="http://www.okasp.com/techinfo/img/open.gif" border=0>頁面三</a></div>
<script language="JavaScript">
if (NS4) {
firstEl = "KB1Parent";
firstInd = getIndex(firstEl);
arrange();
}
</script>


標(biāo)簽:樹型菜單-用JS編寫 

相關(guān)文章

主站蜘蛛池模板: 天天看天天爽天天摸天天添 | 亚洲综合久 | 日韩黄色免费观看 | 婷婷五色| 日韩一级一欧美一级国产 | 日韩在线色 | 日韩在线二区 | 日本三级香港三级三级人!妇久 | 日韩欧美中文字幕一区 | 天天曰天天 | 综合久久久久久 | 亚洲欧美中日韩中文字幕 | 亚洲欧美香蕉在线日韩精选 | 天天做天天爱天天干 | 色羞羞| 日本一二区在线观看 | 亚洲专区路线一路线二天美 | 天堂网www天堂在线资源链接 | 天堂a免费视频在线观看 | 午夜免费看视频 | 在线视频中文字幕 | 亚洲 欧美 精品专区 极品 | 色综久久 | 日韩欧美在线视频 | 日韩中文字幕在线观看视频 | 亚洲乱码一二三四五六区 | 欧美专区在线观看 | 中文字幕伦伦精品 | 视频在线91 | 欧美亚洲另类图片 | 欧美性黄色 | 日本人亚洲人成人 | 亚洲精品九色在线网站 | 日日夜夜天天人人 | 青青动漫 | 手机看片久久国产免费不卡 | 午夜在线观看免费高清在线播放 | 青青青手机视频在线观看 | 欧美在线视频a | 一级做a爰全过程免费视频 一级做a爰片性色毛片小说 | 亚洲欧美国产精品第1页 |