日期:2014-05-17 浏览次数:21037 次
function addRow(tabObj, colNum, targPos) {
var sorPos = parseInt("<%=GetLinCount()%>") + 4;
var IDTab = String(sorPos);
var nTR = tabObj.insertRow(tabObj.rows.length - targPos);
var TRs = tabObj.getElementsByTagName('tr'); // Get TRs collection from the appointed table
var sorTR = TRs[sorPos]; // Positioned the sorTR
var TDs = sorTR.getElementsByTagName('td');
if (colNum == 0 || colNum == undefined || colNum == isNaN) {
colNum = tabObj.rows[4].cells.length;
}
var ntd = new Array(); // Create a new TDs array
for (var i = 0; i < colNum; i++) {
ntd[i] = nTR.insertCell();
if (0 == i) {
ntd[i].style.cssText = "BORDER-TOP: #168bd9 2px solid;BACKGROUND-COLOR: #168bd9";
}
else {
if (1 == i) {
ntd[i].id = "name" + IDTab;
}
if (2 == i) {
&n