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"; } 隐藏
}
};
解决方案 »
- 如何将函数制为空函数且不执行参数?
- onresize IE下多次执行的问题 请大牛赐教
- axiheyhey 补分,结贴了才看见你的回复。
- 鼠标移到图片上变为另外一副图
- javascript中字符串替换:怎样把\替换为\\
- 谁有这种JS代码,发一个给我
- 为什么把一段有回车的文本传到servlet,然后再提出来,用==比较就不相等了??
- 页面初始化的时候焦点位置让它固定!急急急!!
- 这样初始化数组不行吗???var people = new Array(2);people = {"姓名", "性别"};
- 能否用javascript 递归算法实现这个功能?
- 请教帮主!
- 问题多多。不知何解?(有兴趣的可以看看)日历
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>