jquery点击标签下面的表格显示及隐藏 this.style.display=nonethis.style.display=block切换就行了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 this.style.display=nonethis.style.display=block你这个说的应该是点击的本身隐藏我要的是点击后,下面的表格隐藏显示。,而且别的表格不显示 给表格设置上id,或name属性,通过document.getElementById或document.getElementsByName[0].style.display=none|blocks就可以实现表格的隐藏显示了 js你已经写出来了 你只需要把html改下就好了<h3>标题一 <div class="div1">标题一简单描述</div></h3><table id="tab_box" class="tab"> <tr> <td>标题一内容</td> </tr></table> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#tab_box2").hide(); $("#tab_box3").hide(); $("h3").click(function() { $(this).parent().siblings().children(".tab").hide(); $(this).next().next().show(); }) }) </script> </head> <body> <div> <h3>标题一</h3> <div class="div1">标题一简单描述</div> <table id="tab_box1" class="tab" border="1"> <tr> <td>标题一内容</td> </tr> </table> </div> <div> <h3>标题二</h3> <div class="div1">标题二简单描述</div> <table id="tab_box2" class="tab" border="1"> <tr> <td>标题二内容</td> </tr> </table> </div> <div> <h3>标题三</h3> <div class="div1">标题三简单描述</div> <table id="tab_box3" class="tab" border="1"> <tr> <td>标题三内容</td> </tr> </table> </div> </body></html>html结构改了下 在外面加了层div 怎样实现垂直滚动条每间隔30秒下拉一屏 JavaScript 实现像画卷展开一样的效果 请问谁知道??? js中怎么截取中文字符串呀. 就是一排LOGO,停顿一段时间之后向上翻滚,然后换成另外一排LOGO向上翻滚怎么做呢? 关于正则表达式:如何匹配所有字符 求助,javascript动态控制select option 获取value并刷新 改变selected 获取窗体点击滚动条后偏移的象素值. javascript 如何检测时间格式? 请交如何解决这个bug?鼠标消息传给滚动条,但是不能传给层本身的移动函数?(附代码) easyui 的扩展验证 小米官网是怎样判断手机or电脑访问的
this.style.display=block
你这个说的应该是点击的本身隐藏
我要的是点击后,下面的表格隐藏显示。,而且别的表格不显示
给表格设置上id,或name属性,通过
document.getElementById或document.getElementsByName[0].style.display=none|blocks
就可以实现表格的隐藏显示了
<div class="div1">标题一简单描述</div>
</h3>
<table id="tab_box" class="tab">
<tr>
<td>标题一内容</td>
</tr>
</table>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#tab_box2").hide();
$("#tab_box3").hide();
$("h3").click(function() {
$(this).parent().siblings().children(".tab").hide();
$(this).next().next().show();
})
})
</script>
</head>
<body>
<div>
<h3>标题一</h3>
<div class="div1">标题一简单描述</div>
<table id="tab_box1" class="tab" border="1">
<tr>
<td>标题一内容</td>
</tr>
</table>
</div>
<div>
<h3>标题二</h3>
<div class="div1">标题二简单描述</div>
<table id="tab_box2" class="tab" border="1">
<tr>
<td>标题二内容</td>
</tr>
</table>
</div>
<div>
<h3>标题三</h3>
<div class="div1">标题三简单描述</div>
<table id="tab_box3" class="tab" border="1">
<tr>
<td>标题三内容</td>
</tr>
</table>
</div>
</body>
</html>html结构改了下 在外面加了层div