1.c:forEach遍历输出
<c:forEach items="${data}" var="item" >
<a onclick="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);
}