[thelist] DHTML Question

Matt Warden mwarden at gmail.com
Thu Jul 7 14:46:43 CDT 2005

On 7/7/05, Steve James <steve at epicunion.com> wrote:
> I want to make a global change to all divs using javascript, but they
> don't have ID's (trying to make this XHTML compliant). Is there a way to
> do something to the affect of:
> document.div.style.visibility = "hidden";

var divs = document.getElementsByTagName('div');
for (var i=0; i<divs.length; i++)
   divs[i].style.visibility = 'hidden';
} // end for

Although, removing id's doesn't have anything to do with making a page
XHTML compliant.

Matt Warden
Miami University
Oxford, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list