Insert th in thead

后端 未结 4 1882
时光取名叫无心
时光取名叫无心 2021-02-01 16:15

I want to insert a th tag inside tr of thead element of a table. I am using insertCell method of row object created under

4条回答
  •  不思量自难忘°
    2021-02-01 16:47

    Use table.tHead.children[0].appendChild(document.createElement("th")) method instead. Basically you have to create a th at runtime and insert it into your thead.

提交回复
热议问题