简体   繁体   中英

How to get list status of checkbox in java?

I have a list checkbox. in jsp page.(JAVA)

<td><input type="checkbox"  name="foo" id="${tes.status}" value="${tes.No}"></td>

example (checked, null, checked, null). When I use:

String[] listStatus = request.getParameterValues("foo");

I just get a array is (checked, checked). How can I get all status of checkbox to String[] listStatus. Expected: (checked, null, checked, null)

Those whose list you do not get is unchecked . You can also use jquery to find out

see the example here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM