![]() |
|
|
+ Search |
![]()
|
Apr 7th, 2008 22:34
ha mo, Dave Clark, Matt Chatterley, david koenig,
First, retrieve the element e.g:
ob = getElementByID('Elem1');
Then update the style.class property:
ob.style.class = 'cl2';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hmmm... "class" is not a style -- it is an HTML tag attribute.
Seems that would have to be like this for cross-browser functionality:
ob = document.getElementByID('Elem1');
ob.className = 'cl2';
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com