how to toggle (hide/show) a table onClick of tag in java script

前端 未结 8 2350
青春惊慌失措
青春惊慌失措 2021-02-05 13:24

I want to show and hide (toggle) the

onClick event of the . this is my tag

&         


        
      
      
      
8条回答
  •  甜味超标
    2021-02-05 13:41

    Your anchor tag should be:

      Login
    

    And You javascript function :

    function showHideTable()
    {
       if (document.getElementById("loginTable").style.display == "none" ) {
           document.getElementById("loginTable").style.display="";
    
       } else {
          document.getElementById("loginTable").style.display="none";
    
    }
    

提交回复
热议问题