One, local change style
It is divided into two types: change the direct style, change the classname and change the CSS tutorial text three. It is to be noted that:
Note Case:
Web effects on the case is very sensitive, classname can not be "n" written "n", Csstext also can not write "T" written "T", otherwise can not achieve the effect.
Call Method:
If you change classname, the class is declared in the style sheet beforehand, but not with style, like document.getElementById (' obj '). Style.classname= "..." is wrong! Can only be written as: document.getElementById (' obj '). Classname= "..."
Change Csstext
But if you use Csstext, you must add style, the correct way is: document.getElementById (' obj '). style.csstext= "..."
Change the direct style I do not have to say, we remember to write to the specific style can be, such as
document.getElementById (' obj '). style.backgroundcolor= "#003366