<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>动态增删表格行</title> <script language="JavaScript"> <!-- //author: Robin //email: griefforyou@gmail.com
var rowIndex=0; function addLine(obj){ var objSourceRow=obj.parentNode.parentNode; var objTable=obj.parentNode.parentNode.parentNode.parentNode; if(obj.value=='增加'){ rowIndex++; var objRow=objTable.insertRow(rowIndex); var objCell;