<c:forEach items="${questionList}"var="questionList" varStatus="vs"> <form name="form1" method="post"> <input type="hidden" name="id" id="id" value="<c:out value="${questionList.id}"></c:out>"> <input type="button" va
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 00:17:15
<c:forEach items="${questionList}"var="questionList" varStatus="vs"> <form name="form1" method="post"> <input type="hidden" name="id" id="id" value="<c:out value="${questionList.id}"></c:out>"> <input type="button" va
<c:forEach items="${questionList}"var="questionList" varStatus="vs"> <form name="form1" method="post"> <input type="hidden" name="id" id="id" value="<c:out value="${questionList.id}"></c:out>"> <input type="button" value="提交" onClick="studentTest()" /> </form></c:forEach> 各位大侠救救我:为啥在studentTest()中通过document.getElementById("id").value;获取的id值永远都只是questionList的第一条记录的id呢?
<c:forEach items="${questionList}"var="questionList" varStatus="vs"> <form name="form1" method="post"> <input type="hidden" name="id" id="id" value="<c:out value="${questionList.id}"></c:out>"> <input type="button" va
id是唯一的,你循环中每个id(