13,100
社区成员
发帖
与我相关
我的任务
分享
//JSP页面中的Javay语言,这种写法不可取
<%
ProductService productService=new ProductServiceIpml();
List<Product> newList=productService.findByNew();
request.setAttribute("newList",newList);
%>
//遍历上面的newList属性,
<c:forEach items="${newList}" var="p">
<div class="col-md-2" style="text-align:center;height:200px;padding:10px 0px;">
<p><a href="#"'>${p.pname}</a></p>
</div>
</c:forEach>
$(function () {
$.post(URL,Param,function (flag) {
/*
访问URL获取newList数据
*/
});
});
request.setAttribute("newList",newList);
<c:forEach items="${newList}" var="p">
<div class="col-md-2" style="text-align:center;height:200px;padding:10px 0px;">
<p><a href="#"'>${p.pname}</a></p>
</div>
</c:forEach>