I am wondering how I can hide all divs on the page only using JavaScript, I cannot use jQuery. Is there a way to do this without using the arrays that comes with document.getElementByTag? Or if there is not, could you show me how to hide all?
I am wondering how I can hide all divs on the page only using
Share
Use
getElementsByTagName()to get a list of alldivelements, and then set their CSSdisplayproperty tonone: