以下这段代码,实现一个隐藏行的功能。不过我想知道,在第一行有多个 的情况下,怎样和隐藏行对齐。

hobyyyy 2004-10-26 11:20:20
以下这段代码,实现一个隐藏行的功能。
不过我想知道,在第一行有多个<td> 的情况下,怎样和隐藏行对齐。

<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
body,td {
FONT: 9pt Arial;
}
.collapsed {
DISPLAY: none
}
.line {
CURSOR: hand
}
.article {
BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; VISIBILITY: hidden
; background-color: #FFCC00; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px
}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
.jj {vertical-align:bottom ;background-color:#ececc0;height:20;padding:3;}

</style>
<SCRIPT language=JScript>

function outliner()
{
var child = document.all[event.srcElement.getAttribute("child",false)];
if (null != child){
if(child.className == "collapsed")
{
child.className = "expanded";
return;
}
if(child.className == "expanded")
{
child.className = "collapsed";
return;
}
}
}



//-->
</SCRIPT>
</HEAD>

<BODY>
<table width="80%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#2A43A2';" class=title onclick=outliner()
bgColor=#B2CDE9 height=18 child="DALL"
NAME="NAME_BALL" style="cursor:hand" colspan="" >open&close</td>

</tr>
<tr>
<td>
<DIV class=collapsed id=DALL>
<DIV onclick=outliner() child="DALL1">
<TABLE cellSpacing="1" cellPadding=0 width="100%" border=0 class="jj">

<TR>
<TD width="32%"><a name="Market Place"></a>Market Place</TD>
<TD width="68%">Market Place </TD>
</TR>

</TABLE>
</DIV></DIV>

</td>

</tr>

</table>
</BODY>
</HTML>
...全文
142 1 打赏 收藏 举报
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
JK_10000 2004-10-26
  • 打赏
  • 举报
回复
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<style>
body,td {
FONT: 9pt Arial;
}
.collapsed {
DISPLAY: none
}
.line {
CURSOR: hand
}
.article {
BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FILTER: revealTrans(transition=23,duration=0.5) blendTrans(duration=0.5); POSITION: absolute; VISIBILITY: hidden
; background-color: #FFCC00; padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px
}
.DEK {POSITION:absolute;VISIBILITY:hidden;Z-INDEX:200;}
.jj {vertical-align:bottom ;background-color:#ececc0;height:20;padding:3;}

</style>
<SCRIPT language=JScript>

function outliner()
{
var child = document.all[event.srcElement.getAttribute("child",false)];
if (null != child){
if(child.className == "collapsed")
{
child.className = "expanded";
return;
}
if(child.className == "expanded")
{
child.className = "collapsed";
return;
}
}
}



//-->
</SCRIPT>
</HEAD>

<BODY>
<table width="80%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#2A43A2';" class=title onclick=outliner()
bgColor=#B2CDE9 height=18 child="DALL"
NAME="NAME_BALL" style="cursor:hand" colspan="" >open&close</td>


<td onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#2A43A2';" class=title onclick=outliner()
bgColor=#B2CDE9 height=18 child="DALL"
NAME="NAME_BALL" style="cursor:hand" colspan="" >open&close</td>


<td onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#2A43A2';" class=title onclick=outliner()
bgColor=#B2CDE9 height=18 child="DALL"
NAME="NAME_BALL" style="cursor:hand" colspan="" >open&close</td>


<td onMouseOver="this.style.color='#cc0033';" onMouseOut="this.style.color='#2A43A2';" class=title onclick=outliner()
bgColor=#B2CDE9 height=18 child="DALL"
NAME="NAME_BALL" style="cursor:hand" colspan="" >open&close</td>

</tr>
<tr>
<td colspan=100>
<DIV class=collapsed id=DALL>
<DIV onclick=outliner() child="DALL1">
<TABLE cellSpacing="1" cellPadding=0 width="100%" border=0 class="jj">

<TR>
<TD width="32%"><a name="Market Place"></a>Market Place</TD>
<TD width="68%">Market Place </TD>
</TR>

</TABLE>
</DIV></DIV>

</td>

</tr>

</table>
</BODY>
</HTML>
相关推荐
发帖
JavaScript

8.7w+

社区成员

Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
帖子事件
创建了帖子
2004-10-26 11:20
社区公告
暂无公告