Dynamic creation of table with DOM

前端 未结 9 1063
面向向阳花
面向向阳花 2020-11-28 06:07

Can someone tell me what\'s wrong with this code? I want to create a table with 2 columns and 3 rows, and in the cells I want Text1 and Text2 on every row. This code creates

9条回答
  •  情深已故
    2020-11-28 06:39

    when you say 'appendchild' you actually move your child from one parent to another. you have to create a node for each cell.

提交回复
热议问题