当前页面: 开发资料首页 → Javascript 专题 → javascript的图片浏览
摘要: javascript的图片浏览
<head>
function initIt(){
divCount = document.all.tags("DIV");
for (i=0; i
if (obj.className == "child" || obj.className == "child1") obj.style.display = "none";
}
}
function expandIt(el) {
obj = eval("page" + el);
obj2 = eval("main" + el);
if (obj.style.display == "none") {
obj.style.display = "block";
obj2.all.tags(img)[0].src=images/icon-folder1-open.gif;
obj2.all.tags(img)[1].src=images/icon-folder-open.gif;
}
else {
obj.style.display = "none";
obj2.all.tags(img)[0].src=images/icon-folder1-close.gif;
obj2.all.tags(img)[1].src=images/icon-folder-close.gif;
}
}
onload = initIt;
var judge=0;
function expandall(o) {
if (judge==0) {divCount2 = document.all.tags("DIV");
for (i=0; i
if (obj2.className == "child" || obj.className == "child1" || obj2.style.display == "none")
{obj2.style.display = "block";}
if (obj2.className == "menu")
{obj2.all.tags(img)[0].src=images/icon-folder1-open.gif;
obj2.all.tags(img)[1].src=images/icon-folder-open.gif;
}
}
judge=1;
o.src=images/icon-closeall.gif;
o.alt=全部折叠;
}
else {divCount2 = document.all.tags("DIV");
for (i=0; i
if (obj2.className == "child" || obj.className == "child1" || obj2.style.display == "block")
{obj2.style.display = "none";}
if (obj2.className == "menu")
{obj2.all.tags(img)[0].src=images/icon-folder1-close.gif;
obj2.all.tags(img)[1].src=images/icon-folder-close.gif;
}
}
judge=0;
o.src=images/icon-expandall.gif;
o.alt=全部展开;
}
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" onselectstart="return false;">
<table id=control width="100%" border="0" cellspacing="0" cellpadding="0" class="borderon">
<tr>
<td height="20" style="padding-top:3px">
<td width="20" align="center" valign="top"></td>
<td width="20" align="center" valign="top"></td>
</tr>
</table>