DIV显示问题
<script Language=JavaScript>
var flaw=1;
function my_view()
{
if(flaw==1)
{
document.all.Layer1.style.visibility="";
my_img.src="images/menu/arrow_up.gif";
}
else
{
document.all.Layer1.style.visibility="hidden";
my_img.src="images/menu/arrow_down.gif";
}
flaw=1-flaw;
}
</script>
<a href="javascript:my_view(id)"><img src="images/menu/arrow_down.gif" name="my_img" border=0></a>
<div id="Layer1" style="visibility: hidden">11111111</div>
<div id="Layer2" style="visibility: hidden">22222222</div>
为什么只能显示与隐藏一行信息呀,如何实现隐藏与显示多行呢?
------解决方案--------------------使用循环啊
Layer1[i]可取单独元素
------解决方案--------------------用两个表格分别多条数据,来回隐藏就行了//