日期:2014-05-16 浏览次数:20319 次
//清空原有表格数据
|
02 |
function ? delCellRow(contId,elem){??
|
03 |
???? var length =
elem.length-1;
|
04 |
???? var str= "" ;
|
05 |
???? for ( var j=1;j<length;j++){
|
06 |
???????? document.getElementById(contId).deleteRow(1);
|
07 |
???? }
|
08 |
}
|
09 |
? ? |
10 |
//新增表格行
|
11 |
function add(tableId,dataArr){?
|
12 |
???? var addtable =
document.getElementById(tableId);?
|
13 |
???? var newRow =
addtable.insertRow(addtable.rows.length-1);?
|
14 |
???? var newTd0 =
newRow.insertCell(0);?
|
15 |
???? newTd0.innerHTML= "内容1" ;???
|
16 |
???? var newTd1 =
newRow.insertCell(1);?
|
17 |
????
|