所以我不确定如何标记这一个,但基本上我有一个动态加载的HTML表,其中包含可以删除的值,目前我正在使用用户的复选框决定删除哪一行。这是我到目前为止的代码:帮助从HTML表中删除字段
<table id="comments" align="center" width="59%">
<thead>
<th class="headerClass" width="7%">Delete</th>
<th width="15%" class="headerClass">Date</th>
<th class="headerClass" width="15%">Employee</th>
<th class="headerClass">Comment</th>
</thead>
<tbody>
<%
while (result.next()) {
commentDate = StringUtils.defaultString(result.getString("commentDate"));
commentUser = StringUtils.defaultString(result.getString("cName"));
comment = StringUtils.defaultString(result.getString("xbs_comment"));
%>
<tr>
<td class="normal"><input type="checkbox" class="checkbox" /></td>
<td class="normal"><%=commentDate%></td>
<td class="normal"><%=commentUser%></td>
<td class="normal" width="68%"><%=comment%></td>
</tr>
</tbody>
</table>
<label for="comment"><h4>Add a Comment:</h4></label>
<textarea cols="105" id="comment" name="comment" rows="4"></textarea>
<br />
<div align="center" class="submit">
<input class="submit" width="10%" type="submit" name="submit" id="submit" value="Submit" />
</div>
基本上我有意见表中,用户可以使用提交按钮添加评论,但我想他们也可以使用支票框删除评论。我是否需要另一个带有删除按钮的表格标签,或者我可以只使用这一个提交按钮?另外,如果我确实留在复选框中,我怎么让我的程序(函数和servlet)的后端知道哪些被检查?谢谢你的帮助!!
我添加了jsp和java标签,所以在这里有专业知识的人会看到这些,并可以帮助你。我知道这些标签需要解决您的问题。 – ace 2011-04-30 08:48:39