pmdesign Posted July 5, 2006 Share Posted July 5, 2006 Hi there,I just wonder is is possible to change the class of an element using javascript.Specaily a table element.Here's my code:<table class="border_table" onMouseOver="this.style.background='#f6f6f6'" onMouseOut="this.style.background='#FFFFFF'">...</table>I just wanna change all the class. Something like: onMouseOver="this.class='class1'"oronMouseOver="this.class.name='class1'"Any sugestions ? Link to comment Share on other sites More sharing options...
aspnetguy Posted July 5, 2006 Share Posted July 5, 2006 <div onmouseover="this.className='mouseOverClass'" onmouseout="this.className='mouseOutClass'"></div> Link to comment Share on other sites More sharing options...
pmdesign Posted July 5, 2006 Author Share Posted July 5, 2006 <div onmouseover="this.className='mouseOverClass'" onmouseout="this.className='mouseOutClass'"></div> <{POST_SNAPBACK}> THANKS A LOT Link to comment Share on other sites More sharing options...
aspnetguy Posted July 5, 2006 Share Posted July 5, 2006 no problem...glad it works for you! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now