"."/> ".">

Home  >  Article  >  Web Front-end  >  How to hide tr in html

How to hide tr in html

藏色散人
藏色散人Original
2021-04-12 09:43:202921browse

htmlHow to hide tr: First create an HTML sample file; then define the rows in the HTML table through the tr tag; finally hide it through "23d1eb367280859b9f3d70033d9b412f" Can.

How to hide tr in html

## The operating environment of this article: windows7 system, HTML5&&CSS3 version, Dell G3 computer.

Hide and show the a34de1251f0d9fe1e645927f19a896e8 tag in Html

Hide and show the TR tag: block (show) and none (hide)

 <tr  style="display:none">
<tr id="sample"
            style="display: <s:if test="sample == 1">block</s:if><s:else>none</s:else>">
            <td>
                sample
            </td>
</tr>
<script type="text/javascript">
function changeTR(selectedValue)
{
    var tr1 = document.getElementById("sample");
    if (selectedValue == 0)
    {
        tr1.style.display = &#39;block&#39;;
    }
    else
    {
        tr1.style.display = &#39;none&#39;;
    }
}
</script>

[Recommended learning:

HTML video tutorial

The above is the detailed content of How to hide tr in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn