1.c:forEach遍历输出
<c:forEach items="${data}" var="item" > <a οnclick="downfile(this)" id="${item.filename}" plain="true"><h1>${item.filename}</h1></a><br/> </c:forEach>
2.获取点击的function
function downfile(e){ var id = $(e).attr("id");
alert(id);
}
转载于:https://www.cnblogs.com/hl-spring/p/8108685.html