开发者

Return value of checkbox

Can i Know what is the return va开发者_如何学Clue for checkbox? Is it string?


<input type="checkbox" name="newproposal" value="checked">

Use the value attribute to specify the value that will be submitted.

On the server side with JSP, the value will be a String. If it is checked, then the submitted String will be equal to the value attribute. Use String.equals to decide whether it was checked.

<% boolean newproposal_checked = "checked".equals(request.getParameter("newproposal")); %>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜