2 prince 0123 Prince_0123 于 2016.09.09 11:13 提问

springmvc checkbox标签隐藏value为on

jsp代码;

 课程:<c:forEach items="${courseList }" var="course01">
        <form:checkbox path="courseIdList" value="${course01.courseId}"/>${course01.courseName}
        </c:forEach>                             
        <br/>

        源码:
         课程:
        <input id="courseIdList1" name="courseIdList" type="checkbox" value="1"/><input type="hidden" name="_courseIdList" value="on"/>语文

        <input id="courseIdList2" name="courseIdList" type="checkbox" value="2"/><input type="hidden" name="_courseIdList" value="on"/>数学

        <input id="courseIdList3" name="courseIdList" type="checkbox" value="3"/><input type="hidden" name="_courseIdList" value="on"/>美术

        <br/> 

1个回答

devmiao
devmiao   Ds   Rxr 2016.09.09 23:44
Csdn user default icon
上传中...
上传图片
插入图片