开发者

XHTML rowspan when using DOM

开发者 https://www.devze.com 2023-04-13 02:07 出处:网络
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 some

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号