Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: how do I create a text dinamically?


Message #1 by "lilia lopez" <lilialopez47@h...> on Tue, 21 Jan 2003 21:14:47
I just realized I miss this little question.

> How can I invoke the property bgcolor for the row?

This property's DOM equivalent is bgColor, cf this URL :
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-6986576

But since bgcolor is deprecated in HTML4, it's advised to use CSS way.  That
is :

var myTR = document.getElementById("theTR")
// or whatever way that gives you the table row element
myTR.style.backgroundColor = "#00ff00"

For a list of properties name, look here :
http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSS2Properties

But in general rule, if you know the CSS name, the DOM property name is a
whole word in which initial letter is capitalized (C++ and Java convention)

  Return to Index