Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to change style on an element?
How to change style on an element?
✍: Guest
Between CSS and javascript is a weird symmetry. CSS style rules are layed on top of the DOM. The CSS property names like "font-weight" are transliterated into "myElement.style.fontWeight". The class of an element can be swapped out. For example:
document.getElementById("myText").style.color = "green";
document.getElementById("myText").style.fontSize = "20";
-or-
document.getElementById("myText").className = "regular";
2011-05-31, 4489👍, 0💬
Popular Posts:
Which is the best place to store ConnectionString in Dot Net Projects? I am about to deploy my first...
How to reduce the final size of an executable file? Size of the final execuatable can be reduced usi...
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
How can you implement MVC pattern in ASP.NET? The main purpose using MVC pattern is to decouple the ...