Monday, October 17, 2011

Change CSS dynamically in javascript

// this simply appends the following words
//document.getElementById("message").className += "MyClass";
                                               
// this removes the words and sets border and background to White.
document.getElementById("message").className = "message";
document.getElementById("message").innerHTML = ' ';

No comments:

Post a Comment