Toggle display:none style with JavaScript

前端 未结 5 1379
逝去的感伤
逝去的感伤 2020-12-13 17:53

I want to change the style (second line below) to remove the display: none; part when the user clicks on the \"Show All Tags\" link. If the user clicks the \"Sh

5条回答
  •  执念已碎
    2020-12-13 18:12

    Give the UL an ID and use the getElementById function:

    
    
        
    
    Show All Tags
    
    • Item 1
    • Item 2
    • Item 3

提交回复
热议问题