table 中的div 隐藏属性无法设置的吗?有什么办法可以隐藏表格的其中一行? 你结构写的不对,干嘛又加个div,直接把id写在tr上面就行了。把div去掉。<tr id='a1'><td>bbbbbbbbbbbbbbb</td></tr>你那样写,看看div会出现在哪里。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function test(){ document.getElementById("a1").style.display="none"; } </script> <body> <table border=1> <tr><td>aaaaaaaaaaaaaaaaa</td> </tr> <tr id='a1'><td>bbbbbbbbbbbbbbb</td> </tr></table><input type="button" value="测试" onclick="test();"> <!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=gb2312" /><title>无标题文档</title><script type="text/javascript">function test(){ document.getElementById("a1").style.display="none"; }</script></head><body><table border=1> <tr><td>aaaaaaaaaaaaaaaaa</td> </tr> <tr id="a1"><td>bbbbbbbbbbbbbbb</td> </tr></table><input type="button" value="测试" onclick="test();"> </body></html> 请教一个正则表达式. JQUERY选择器问题 网页的js控制windows media player 在win7下完美运行 而xp中却不行 为 javascript 的 String 对象增加一个 format(args[])方法。 这段代码为什么不能实现滚动到页面底部? 怎样在页面上检测事件和事件的对象 大家救命:jquery弹出层中再弹出一层,赋值不了 javascript调用JS文件的函数怎么不显示返回值 如何验证一个网页中的所有textbox全部为空? 怎么得到document.referrer的值 [ ]和()有什么区别呢 jquery的问题,求救了
document.getElementById("a1").style.display="none";
}
</script>
<body>
<table border=1>
<tr>
<td>aaaaaaaaaaaaaaaaa</td>
</tr> <tr id='a1'>
<td>bbbbbbbbbbbbbbb</td>
</tr></table>
<input type="button" value="测试" onclick="test();">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function test(){
document.getElementById("a1").style.display="none";
}
</script>
</head><body>
<table border=1>
<tr>
<td>aaaaaaaaaaaaaaaaa</td>
</tr> <tr id="a1">
<td>bbbbbbbbbbbbbbb</td>
</tr>
</table>
<input type="button" value="测试" onclick="test();">
</body>
</html>