使用< div style =" display:none">隐藏表格资料。 [英] Hiding table data using <div style="display:none">
本文介绍了使用< div style =" display:none">隐藏表格资料。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以,我已经隐藏整个表是这样,这工作得很好:
So, I've hidden whole tables like this, which works fine:
<div style="display:none">
<table>
<tr><th>Test Table</th><tr>
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
</table>
</div>
但我想隐藏只是一个像这样的组行:
But I want to hide just a group of rows like this:
<table>
<tr><th>Test Table</th><tr>
<div style="display:none">
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
</div>
</table>
但这不行。任何提示?
推荐答案
只需将样式属性tr标签。在多个TR标签的情况下,你必须将样式应用到每一个元素,或者在TBODY标签将它们包装:
Just apply the style attribute to the tr tag. In the case of multiple tr tags, you will have to apply the style to each element, or wrap them in a tbody tag:
<table>
<tr><th>Test Table</th><tr>
<tbody style="display:none">
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
<tr><td>123456789</td><tr>
</tbody>
</table>
这篇关于使用< div style =" display:none">隐藏表格资料。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文