HTML-Servlet复选框堆栈

时间:2018-10-23 08:26:26

标签: java html servlets

我有这个堆栈,我试图找到我的错误,但是我找不到。

当我打印有效复选框时,无论是否选中,该值为null。

<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label><input   type="checkbox" name="checkboxconfirm" > 
<p style="color:Blue;">I agree to the terms and 
conditions</p</label>
</div>
</div>
</div>
boolean validcheckbox = request.getParameter("checkboxconfirm");
out.println("<b>checkbox: </b>" + validcheckbox + "<br>");

0 个答案:

没有答案