这是我的spring mvc jsp代码片段
<c:forEach var="trackRecord" varStatus = "number" items="${contractDetails.trackRecordEntries}" >
<tr class="tafont">
<td class="varcar"><form:input readonly = "true" name = "installmentNo" id = "installmentNo" path="trackRecordEntries[${number.index}].installmentNo"/></td>
<td class="varcar"><form:input readonly = "true" name = "installmentAmount" id = "installmentAmount" path = "trackRecordEntries[${number.index}].installmentAmount"/></td>
<td class="varcar"><form:input readonly = "true" name = "dueDate" id = "dueDate" path="trackRecordEntries[${number.index}].dueDate"/></td>
<td class="varcar"><form:input cssClass="recievedDate" name = "recievedDate" id = "recievedDate" path="trackRecordEntries[${number.index}].recievedDate"/></td>
<td class="varcar"><form:input id = "recieptAmount" name = "recieptAmount" path="trackRecordEntries[${number.index}].recieptAmount"/></td>
<td class="varcar"><form:input id = "delayDays" name = "delayDays" path="trackRecordEntries[${number.index}].delayDays"/></td>
</tr>
</c:forEach>
它将bean的arraylist绑定到jsp页面。问题是我不能使用带有标签的“ name
”属性。<form:input>
我需要 name 属性,因为我想使用执行 javascript 验证document.getElementsByName("name");
任何解决方案??