<script> $('#exampleModal').on('show.bs.modal', function (event) { var button = $(event.relatedTarget) var recipient = button.data('whatever') var modal = $(this) modal.find(".modal-title").text(recipient); <c:forEach items = "${splist}" var="a"> <c:if test = "${a.spid eq recipient}"> modal.find('.modal-body input').val("${a.kcsl}") </c:if> </c:forEach> }) </script>
相关分类