How to hide/show div tags using JavaScript?

前端 未结 7 889
北海茫月
北海茫月 2020-12-17 20:44

Basically, I\'m trying to make a link that, when pressed, will hide the current body div tag and show another one in its place, unfortunately, when I click the link, the fir

相关标签:
7条回答
  • 2020-12-17 21:24

    You can Hide/Show Div using Js function. sample below

       <script>
            function showDivAttid(){
    
                if(Your Condition)
                {
                 document.getElementById("attid").style.display = 'inline';
                }
                else
                {
                document.getElementById("attid").style.display = 'none';
                }
    
            }
    
        </script>
    

    HTML - Show/Hide this text

    0 讨论(0)
提交回复
热议问题