Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: accessing the class attribute


Message #1 by "Joel Wickard" <joel.wrox.list@l...> on Sat, 21 Jul 2001 14:29:49 -0500
the property which sets the "class" attribute is "className"

document.all.tagname.className = "inactive";

-----Original Message-----
From: Joel Wickard [mailto:joel.wrox.list@l...]
Sent: 21 July 2001 20:30
To: javascript
Subject: [javascript] accessing the class attribute



Hello all,

I'm trying to dynamically change the class attribute of some of the tags 
on my page, but whenever I try to change it with 
"document.all.tagname.class =3D "inactive"  It throws an error and says  
"object expected"  Does anyone know how to get at this attribute without 
throwing an error?

________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com


  Return to Index