// Add rows
$ ("# Adddevice"). Click (function (){
VaR $ table = $ ("# tbdevice TR ");
VaR Len = $ table. length;
VaR trid = "trdevice" + Len;
$ ("# Tbdevice "). append ("<tr id =" + trid + "> <TD> <input type = \" text \ "class = \" field \ "style = \" width: 95%; \ "/> </TD> </TD> <a href = \ "javascript :; deltr ('"+ trid +"') \ "> Delete </a>
</TD> </tr> ");
});
})
// Delete a row
Function deltr (INDEX ){
$ ("Tr [ID =" + index + "]"). Remove ();
}
<Table id = "tbdevice" width = "100%" border = "1">
<Tbody>
<Tr>
<TD> device name </TD>
<TD> Model </TD>
<TD> specification </TD>
<TD> manufacturer </TD>
<TD> quantity </TD>
<TD> planned unit price </TD>
<TD> total amount </TD>
<TD> other requirements </TD>
<TD> <a id = "adddevice" href = "javascript:;" Title = "add device"> Add device </a> </TD>
<TD> <a id = "deletedevice" href = "javascript:;" Title = "Remove row"> delete a device </a> </TD>
</Tr>
<Tr>
<TD>
<Input id = "text14" type = "text" class = "field" style = "width: 95%;"/> </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
<TD> & nbsp; </TD>
</Tr>
</Tbody> </table>