日期:2014-05-17 浏览次数:20419 次
<!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"> <!-- 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; objCell=objRow.insertCell(0); objCell.innerHTML=objSourceRow.cells[0].innerHTML; objCell=objRow.insertCell(1); objCell.innerHTML=objSourceRow.cells[1].innerHTML; objCell=objRow.insertCell(2); objCell.innerHTML=objSourceRow.cells[2].innerHTML.replace(/增加/,'删除'); } else{ objTable.lastChild.removeChild(objSourceRow); rowIndex--; } } //--> </script> </head> <body bgcolor="#ffffff"> <form name="form1" method="post"> <table width="450" border=0 align=center cellPadding="0" cellSpacing="1"> <tr> <td width="200">目的数据库</td> <td width="200">源数据库</td> <td width="50"></td> </tr> <tr> <td> <select name="select"> <option value="" selected>选择</option> <option value="1">第一</option> <option value="2">第二</option> </select></td> <td><select name="select"> <option value="" selected>选择</option> <option value="1">第三</option> <option value="2">第四</option> </select></td> <td> <input name="add" type="button" id="add" value="增加" onClick="addLine(this)"> </td> </tr> </table> </form> </body> </html>