1. 程式人生 > >c:foreach 標簽 varStatus的使用

c:foreach 標簽 varStatus的使用

ica class 標簽 spa blog foreach phone tex code

                <c:forEach items="${MedicalDoctoList }" var="medicalDoctor" varStatus="status">
                    <tr>
                        <td><input style="width: 170px" id="name${status.index+1}" name="name" required="required" value="${medicalDoctor.name }"/></td>
    
                        <td><input style="width: 170px" id="phone${status.index+1}" name="phone" required="required" value="${medicalDoctor.phone }"/></td>
                        
                        <td hidden="hidden"><input style="width: 170px" id="doctorIds" name="doctorIds" required="required" value="${medicalDoctor.doctorId }" style="display:none;"/></td>
    
                        <td> <input type="button" value="刪除" style="width: 80px"
                            onclick
="delDoctorTr(${status.index+1})" /> </td> </tr> </c:forEach>

c:foreach 標簽 varStatus的使用