这是我的电话:
1<a data-toggle="modal" href="#myModal">Remove</a>
2<a data-toggle="modal" href="#myModal">Remove</a>
3<a data-toggle="modal" href="#myModal">Remove</a>
这是一个列表。我想在按下确认时获得正确的ID(1,2或3)。谢谢!
我的模态
<div class="modal fade" id="myModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
<h2>I decline being evaluated for this period.</h2>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<%if(aList!= null && aList.size() > 0) {%><a href="form.jsp?docID=<%=aList.getIdStr()%>&hStatus=S" class="btn btn-primary" role="button">Confirm</a><%}%>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->