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

前端 未结 8 2091
青春惊慌失措
青春惊慌失措 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:32

    visibility property makes the element visible or invisible.

    function showTable(){
        document.getElementById('table').style.visibility = "visible";
    }
    function hideTable(){
        document.getElementById('table').style.visibility = "hidden";
    }
    

提交回复
热议问题