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, 4519👍, 0💬
Popular Posts:
In C#, what is a weak reference? Generally, when you talk about a reference to an object in .NET (an...
Are risk constant through out the project ? * Never say that risk is high through out the project. R...
How to create a thread in a program? You have two ways to do so. First, making your class "extends" ...
What is difference between custom JSP tags and JavaBeans? Custom JSP tag is a tag you defined. You d...
How To Use Subqueries in the FROM clause? - MySQL FAQs - SQL SELECT Statements with JOIN and Subquer...