January 22nd, 2002, 12:33 AM
I have a html table, eg
<TABLE ID="VIEWTABLE" border="1"></TABLE>
var x = VIEWTABLE.insertRow(0);
var c1 = x.insertCell(0);
var c2 = x.insertCell(1);
c1.innerHTML = "hello_1";
c2.innerHTML = "hello_2";
// now i insert another row to the table,
// and i'd like to make it colspan="2", but how?
var y = VIEWTABLE.insertRow(1);
var c3 = y.insertCell(0);
y.cells.style.colspan = "2"; // this one seem not working
c3.innerHTML = "hello_3";
anyone got a solution here?
January 22nd, 2002, 07:13 AM
object.colSpan [ = iCount ]
iCount Integer that specifies or receives the number of columns to span.
This property can be changed only after the page has been loaded.
object.setAttribute(sName, vValue [, iFlags])
sName Required. String that specifies the name of the attribute.
vValue Required. Variant that specifies the string, number, or Boolean to assign to the attribute.
iFlags Optional. Integer that specifies one the following flags:
0 When the attribute is set, it overwrites any attributes with the same name, regardless of their case.
1 Default. The case of the attribute that you set is respected when it is set on the object.