function addRow()
{
var tbl = document.getElementById('tblSample');//tblSample是table的id
var lastRow = tbl.rows.length;
// if there's no header row in the table, then iteration = lastRow + 1
var iteration = lastRow;
var row = tbl.insertRow(lastRow);
// right cell
var cellRight = row.insertCell(0);
cellRight.innerHTML='<span class="STYLE1"><input type="text" size="30" id="linkman'+i+'" name="linkman"/></span>';
$('#linkman'+i).validatebox({
required:true
});
var cellRightSel = row.insertCell(1);
cellRightSel.innerHTML = '<span class="STYLE1"><input type="text" size="30" id="linkphone'+i+'" name="linkphone"/></span>';
$('#linkphone'+i).validatebox({
required:true
});
var cellRight = row.insertCell(2);
cellRight.innerHTML='<span class="STYLE1"><input type="text" size="30" id="linkduty'+i+'" name="linkduty"/></span>';
$('#linkduty'+i).validatebox({
//alert("chishihua");
required:true
});
var cellRight = row.insertCell(3);
cellRight.innerHTML='<span class="STYLE1"><input type="text" size="30" name="memo"/></span>';
var cellRight = row.insertCell(4);
cellRight.innerHTML='<span class="STYLE1"><input type="button" id="drop'+i+'" οnclick="deleterow('+i+')" value="删除"></span>';
i++;
}
<table width="100%" border="0" cellspacing="1" cellpadding="5" id="tblSample">
<tr>
<td align="center" bgcolor="#f2f2f2">联系人</td>
<td align="center" bgcolor="#f2f2f2">联系电话</td>
<td align="center" bgcolor="#f2f2f2">联系人职务</td>
<td align="center" bgcolor="#f2f2f2">备注</td>
<td align="center" bgcolor="#f2f2f2"><input type="button" name="button" id="button" value="添加" οnclick="addRow()"></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><span class="STYLE1">
<input name="linkman" type="text" size="30" class="easyui-validatebox" required id="linkman">
</span></td>
<td bgcolor="#FFFFFF"><span class="STYLE1">
<input name="linkphone" type="text" class="easyui-validatebox" required size="30" id="linkphone">
</span></td>
<td bgcolor="#FFFFFF"><span class="STYLE1">
<input name="linkduty" type="text" class="easyui-validatebox" required size="30">
</span></td>
<td bgcolor="#FFFFFF"><span class="STYLE1">
<input name="memo" type="text" size="30" >
</span></td>
<td bgcolor="#FFFFFF"><span class="STYLE1">
</span></td>
</tr>
</table>