How to add cells dynamically!!
Use insertRow() and The insertCell() method
is used as follows:
insertRow()
var newTR=TableOBJ.insertRow(N);
N represents which row to insert!
Explanation: When N=0, insert to the top row! When N=-1, insert to the end One line, quite omitting this parameter!
insertCell()
var newTD=TrOBJ.insertCell(N);
where N indicates which column to insert into!
Note: When N=0, insert to the top One line! Insert to the last line when N=-1, this parameter is quite omitted!
The following is an example code:
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn