一般来说 当点《增加按钮》的时候是弹出一个页面来增加 我是想在当面页面的下面增加一行 或者 多行 来增加一条数据
<form name="itemForm" id="itemForm">
<table width="900" border="1" cellspacing="0" cellpadding="0" align="center" class="table1">
<tr>
<td width="100"><input type="checkbox" name="ifAll" onClick="checkAll()" ></td>
<td width="200">编号</td>
<td width="200">名字</td>
<td width="200">型号</td>
<td width="200">规格</td>
</tr>
<logic:empty name="itemlist">
<tr>
<td>
<font color="red">没有数据</font>
</td>
</tr>
</logic:empty>
<logic:notEmpty name="itemlist">
<logic:iterate id="item" name="itemlist">
<tr>
<td>
<input type="checkbox" name="selectFlag" class="checkbox1"
value="<bean:write name="item" property="itemNo"/>" >
</td>
<td>
<bean:write name="item" property="itemNo"/>
</td>
<td>
<bean:write name="item" property="itemName"/>
</td>
<td>
<bean:write name="item" property="pattern"/>
</td>
<td>
<bean:write name="item" property="spec"/>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
<table width="900" height="30" border="0" align="center" cellpadding="0" cellspacing="0" class="rd1">
<tr>
<td> <div align="right">
<input name="btnAdd" type="button" id="btnAdd" value="增加" onClick="addItem()">
<input name="btnDelete" type="button" id="btnDelete" value="删除" onClick="deleteItem()">
<input name="btnUpdate" type="button" id="btnUpdate" value="修改" onClick="updateItem()">
<input name="btnSelect" type="button" id="btnSelect" value="查询" onClick="selectItem()">
</div></td>
</tr>
</table>
</form>
<form name="itemForm" id="itemForm">
<table width="900" border="1" cellspacing="0" cellpadding="0" align="center" class="table1">
<tr>
<td width="100"><input type="checkbox" name="ifAll" onClick="checkAll()" ></td>
<td width="200">编号</td>
<td width="200">名字</td>
<td width="200">型号</td>
<td width="200">规格</td>
</tr>
<logic:empty name="itemlist">
<tr>
<td>
<font color="red">没有数据</font>
</td>
</tr>
</logic:empty>
<logic:notEmpty name="itemlist">
<logic:iterate id="item" name="itemlist">
<tr>
<td>
<input type="checkbox" name="selectFlag" class="checkbox1"
value="<bean:write name="item" property="itemNo"/>" >
</td>
<td>
<bean:write name="item" property="itemNo"/>
</td>
<td>
<bean:write name="item" property="itemName"/>
</td>
<td>
<bean:write name="item" property="pattern"/>
</td>
<td>
<bean:write name="item" property="spec"/>
</td>
</tr>
</logic:iterate>
</logic:notEmpty>
</table>
<table width="900" height="30" border="0" align="center" cellpadding="0" cellspacing="0" class="rd1">
<tr>
<td> <div align="right">
<input name="btnAdd" type="button" id="btnAdd" value="增加" onClick="addItem()">
<input name="btnDelete" type="button" id="btnDelete" value="删除" onClick="deleteItem()">
<input name="btnUpdate" type="button" id="btnUpdate" value="修改" onClick="updateItem()">
<input name="btnSelect" type="button" id="btnSelect" value="查询" onClick="selectItem()">
</div></td>
</tr>
</table>
</form>
<html><head><title></title></head>
<script type="text/javascript">
function Add(){
var row=document.getElementById("tab").insertRow();
var cell1=row.insertCell();
var cell2=row.insertCell();
cell1.innerText="企业";
cell2.innerHTML="<input type='text' id='project'>"; }
</script>
<body>
<table id="tab" border="1">
<tr>
<td>个人</td>
<td><input type="text" id="personal">
</tr>
</table>
<input type="button" value="增加" onclick="Add()">
</body>
</html>