div隐藏和显示下一行
2007-10-14 20:57
295 查看
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<SCRIPT language="javascript">
function Display(obj)
{
sid=obj.parentNode.parentNode.parentNode.childNodes[1];
if (sid.style.display == "none")
{
sid.style.display="";
obj.innerText="-";
}else{
sid.style.display="none";
obj.innerText="+";
}
}
</SCRIPT>
</head>
<body>
<form id="form1" runat="server">
<table border=1>
<tr>
<td><div onclick="Display(this)">+</div></td>
</tr>
<tr>
<td>45454545</td>
</tr>
</table>
</form>
</body>
</html>
<head runat="server">
<title>无标题页</title>
<SCRIPT language="javascript">
function Display(obj)
{
sid=obj.parentNode.parentNode.parentNode.childNodes[1];
if (sid.style.display == "none")
{
sid.style.display="";
obj.innerText="-";
}else{
sid.style.display="none";
obj.innerText="+";
}
}
</SCRIPT>
</head>
<body>
<form id="form1" runat="server">
<table border=1>
<tr>
<td><div onclick="Display(this)">+</div></td>
</tr>
<tr>
<td>45454545</td>
</tr>
</table>
</form>
</body>
</html>
相关文章推荐
- 怎么让div显示一行,其余的隐藏。
- 如何让div中的文字只显示一行,多余的文字隐藏并加上省略号
- 如何让div中的文字只显示一行,多余的文字隐藏并加上省略号 .
- jquery 实现定时显示与隐藏div广告代码
- DIV+CSS 布局一行两列,左列固定宽度,右列自适应宽度;设置最小宽度,窗口小的时候显示滚动条.
- js点击隐藏和显示div
- div+CSS设置一行内文字超过宽度不换行且不显示
- jquery的div显示和隐藏
- 多个div在同一行显示
- jquery 导航条 显示和自动隐藏div
- JQuery 浮动DIV显示提示信息并自动隐藏
- javascript 点击固定数据 隐藏或显示DIV
- 显示/隐藏侧边菜单栏div
- JQuery实现搜索关键词变红,包含关键词的div显示,无div的隐藏
- 显示和隐藏div
- JQuery动态显示和隐藏div
- 在HTML中,让两个DIV在同一行显示
- 点击按钮平移隐藏与显示div(使用translate)
- Html 让两个div 显示在同一行
- 页面内部导航控制div显示隐藏的新写法