
<form action="abc.jsp" method="post">
<input type="text" name="word"/>
<input type="submit" value="提交1"/>
</form>
<form action="123.jsp" method="post">
<input type="text" name="word"/>
<input type="submit" value="提交2">
</form>
jsp页面用c:foreach遍历数据库查询出来的list, 然后生成一行数据, 更新按钮是都调用同样一个js方法做更新处理, 只是方法需要传入参数, 参数就是你遍历的值, 每条数据的这个值都是不一样的, 就可以拿到后台做更新处理.demo:
<c:forEach items="${requestScope.resultList}" var="o" varStatus="index">
<tr>
<td>${index.count}</td>
<td><a href="javascript:void(0)" onclick="showEdit('${o.id}')">编辑</td>
</tr>
</c:forEach>
改变select后不在一行了,你把2个select 的style=“width:40%”试试。我觉得肯定是你选的那个option的text造成了宽度变大。
实在不行,你设定td不可换行 nowrap 看看。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)