[Javascript] Table Cells' Attributes: colspan and class
Peter Brunone
peter at brunone.com
Mon May 27 18:13:56 CDT 2002
Scott,
1. The attribute you want is colSpan (note the capital "S").
2. When scripting, this attribute is called className.
Neither of these is part of the style collection, but rather directly
subordinate to the object.
Additionally, you may find it useful to know that you can assign
multiple classes to an element (IE 5+) at design time with the following
syntax:
<ELEMENT CLASS = sClass [ sClass2 [ sClass3 ... ] ] ... >
Cheers,
Peter
-----Original Message-----
From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On
Behalf Of SnarfLT at aol.com
Using JScript (this if for I.E. only) I would like to:
1. Change a table cell's 'colspan=' attribute
2. Change a table cell's 'class=' attribute
Each cell has its own id, so I tried
document.getElementById(cellID).colspan=
and
document.getElementById(cellID).class=
Neither worked, I think class is a reserved word in JScript though, but
I'm not sure. Maybe I can use document.getElementById(cellID).style._? ?
?_. Any ideas?
-Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020527/6079fa74/attachment.htm>
More information about the Javascript
mailing list