function parentid_onchange(selectindex,length)
{for( i=0;i<length;i++)
{abc=eval("a"+i);
if (i==selectindex)
{
abc.style.display="block"; 显示
}
else
{ abc.style.display="none"; } 隐藏
}
};
{for( i=0;i<length;i++)
{abc=eval("a"+i);
if (i==selectindex)
{
abc.style.display="block"; 显示
}
else
{ abc.style.display="none"; } 隐藏
}
};
document.all.div1.style.zIndex="1000"
改变隐藏:
document.all.div1.style.visibility="visible"
document.all.div1.style.visibility="hidden"
<body>
<input type=button onclick="document.all.div1.style.zIndex=100" value=改变位置><br>
<input type=button onclick="document.all.div1.style.visibility='hidden'" value=隐藏层1><br>
<input type=button onclick="document.all.div1.style.visibility='visible'" value=显示层1><br>
<div id=div1 style="position: absolute; left: 25; top: 117; width: 559; height: 26">
<table border="1" width="100%">
<tr>
<td width="100%" bgcolor="#0000FF"> </td>
</tr>
</table>
</div>
<p> </p>
<p> </p><div id=div2 style="position: absolute; left: 38; top: 105; width: 559; height: 26">
<table border="1" width="100%" height="20">
<tr>
<td width="100%" bgcolor="#800080" height="14"> </td>
</tr>
</table>
</div>
</body></html>
<body>
<input type=button onclick="document.all.div2.style.zIndex=100" value=改变位置><br>
<div id=div1 style="position: absolute; left: 25; top: 117; width: 559; height: 26;z-index:30">
<table border="1" width="100%">
<tr>
<td width="100%" bgcolor="#0000FF"> </td>
</tr>
</table>
</div>
<p> </p>
<p> </p><div id=div2 style="position: absolute; left: 38; top: 105; width: 559; height: 26;z-index:20">
<table border="1" width="100%" height="20">
<tr>
<td width="100%" bgcolor="#800080" height="14"> </td>
</tr>
</table>
</div>
</body>
</html>