< ;script language="javascript"> //Add a row to the window table function addNewRow(){ var tabObj=document.getElementById("myTab");//Get the table to add data var rowsNum = tabObj.rows.length; //Get the current number of rows var colsNum=tabObj.rows[rowsNum-1].cells.length;//Get the number of columns of the row var myNewRow = tabObj. insertRow(rowsNum);//Insert new row var newTdObj1=myNewRow.insertCell(0); newTdObj1.innerHTML=""; var newTdObj2=myNewRow.insertCell(1); newTdObj2.innerHTML=""; var newTdObj3=myNewRow.insertCell(2); newTdObj3.innerHTML=""; var newTdObj4=myNewRow.insertCell(3); newTdObj4.innerHTML=" "; } //Delete a row in the window table function removeRow(){ var chkObj=document.getElementsByName("chkArr"); var tabObj=document.getElementById("myTab"); for(var k=0;k if(chkObj[k].checked){ tabObj.deleteRow(k 1); k=-1; } } }
Operation
class="top-bt liebiao-c" align="center" >Node name
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