可以不用层的
<table width=200 border=1>
<tr id="tr1" OnClick="show_hide('tr2')">
<td>Hello</td>
<tr id="tr2">
<td>bye bye</td>
</table>
</BODY>
</HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
function show_hide(id)
{
if(document.all.item(id).style.display == "")
document.all.item(id).style.display = "none"
else
document.all.item(id).style.display = ""
}
//-->
</SCRIPT>当然 你可以用层 只要在函数的参数里传层的 ID 就行了
<table width=200 border=1>
<tr id="tr1" OnClick="show_hide('tr2')">
<td>Hello</td>
<tr id="tr2">
<td>bye bye</td>
</table>
</BODY>
</HTML>
<SCRIPT LANGUAGE="JavaScript">
<!--
function show_hide(id)
{
if(document.all.item(id).style.display == "")
document.all.item(id).style.display = "none"
else
document.all.item(id).style.display = ""
}
//-->
</SCRIPT>当然 你可以用层 只要在函数的参数里传层的 ID 就行了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货