直接看代码吧!!!!!!!!!
页面中的js代码
//ajax局部加载页面
function sortInfo(id,type){
$.get('${base}/artGallery/artGalleryInfo.jhtml',{'id':id,'type':type},function(data){
//得到data中form中的html
// var dd= $(data).find('form').html();
//得到data中的form
var dd= $(data).find('form');
//console.info(dd);
$("#productForm").html(dd);
});
}
页面中有一个form表达来接受传入的数据。
<form id="productForm" action="artGalleryInfo.jhtml" method="get">
<input type="hidden" id="id" name="id" value="${member.id}" />
<input type="hidden" id="pageNumber" name="pageNumber" value="${page.pageNumber}" />
<input type="hidden" id="pageSize" name="pageSize" value="${page.pageSize}" />
<input type="hidden" id="type" name="type" value="${type}" />
[#list page.content as product]
[#if product_index % 2 == 0 && product_index % 9 != 8]
<div class="clo">
[/#if]
[#if product_index % 9 == 8]
<div class="clo last">
[/#if]
<div class="opus" οnclick="window.location.href='${base}/product/detail.jhtml?id=${product.id}'">
<div class="operation">
<span class="show"></span>
<span class="like"></span>
<span class="shar"></span>
</div>
<div class="img">
<img src="${product.image}">
</div>
<div class="p-content">
<p>《${product.name}》</p>
<p>${product.author}<font>¥${product.price}</font></p>
</div>
</div>
[#if product_index % 2 != 0]
</div>
[/#if]
[/#list]
</form>
后台代码就不了,后台接受了两个参数。