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

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

樹型菜單-用JS編寫

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

這個樹型菜單的代碼簡單一點。
<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>


主站蜘蛛池模板: 日韩精品在线免费观看 | 西瓜影院日韩大片在线观看 | 日本免费一区二区三区看片 | 日韩在线1| 日本激情视频网站 | 深爱婷婷网 | 亚洲美女综合 | 最新国产精品亚洲 | 青娱极品盛宴国产精品分类 | 日本性网站 | 中文乱码一二三四有限公司 | 中文字幕专区在线亚洲 | 人人狠| 在线亚洲精品防屏蔽 | 青草国产精品久久久久久 | 天天综合网天天综合色 | 午夜影视在线观看 | 五月激情六月 | 小说区图片区综合久久88 | 日本欧美国产精品 | 亚洲女人天堂 | 中文字幕女教师julia视频 | 四虎最新永久在线精品免费 | 在线天堂中文在线资源网 | 亚洲成a人片777777久久 | 亚洲欧美日韩专区一 | 日本国产一区二区三区 | 三级三级三三级a级全黄 | 天天看片天天爽 | 亚洲欧美综合 | 亚洲免费网站观看视频 | 深夜视频在线看 | 青草视频在线观看免费视频 | 亚洲va欧美va国产综合下载 | 日韩不卡一区二区 | 欧美一级视频在线高清观看 | 日本成a人片在线观看网址 日本草草影院 | 影音先锋亚洲综合小说在线 | 人人艹人人射 | 人人干在线观看 | 欧美一级特黄aaaaaa在线看首页 |