开发者

Return value of checkbox

开发者 https://www.devze.com 2023-02-22 11:26 出处:网络
Can i Know what is the return va开发者_如何学Clue for checkbox? Is it string?<input type=\"checkbox\" name=\"newproposal\" value=\"checked\">

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

精彩评论

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