Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML question, I think! Changing the font weight if possible...

Status
Not open for further replies.

Streetdaddy

Programmer
Joined
Jun 10, 1999
Messages
161
Location
AU
Im using javascript to change the color of the text on a checkbox click event
e.g [div id].style.color = 'ffffff';

is there a way to change the font weight?
e.g [div id].style.font-weight = 'bold';

also, is there a good website DHTML reference with list of properties and methods of various elements? Or should I buy a book?

Miles
busymiles@lan-house.net
 
The convention is to use camal casing.

font-weight = fontWeight
background-color = backgroundColor

so

style.fontWeight = "bold";

has some really god DOM articles. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
good articles rather. =) ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Thanks! ;-)

Those articles are great! Miles
busymiles@lan-house.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top