XHTML rowspan when using DOM
Total beginner in HTML requesting help .. hoping for a 200 response. Something like that.
Am dynamically creating a table using Javascript on the client side. I开发者_C百科 want that table to be something like that:
____________
| | |
|____| |
| | |
|____|_____|
Of course not exactly like that .. that's pure ugly.
My code:
if(i == 0) {
var infoCell = document.createElement("td");
var imgCell = document.createElement("td");
infoCell.width = "300px";
imgCell.width = "300px";
infoCell.rowspan = "4";
imgCell.rowspan = "4";
//infoCell.height = "300px";
//imgCell.height = "300px";
row.appendChild(infoCell);
row.appendChild(imgCell);
}
tbody.appendChild(row);
not working.... I get a cell at the top, while the rest is empty .... I would like to make the cell take the whole space.
I can post the whole code, if needed .. but it's just too long.
rowSpan :O
..
if you still didn't get it .. Replace rowspan with rowSpan.
精彩评论