1.以ajax方式将参数以post方式传到后台
$.ajax({
type:'post',url:'后台路径',
dataType:'html',
success:function(result){
var htmlCont = result;//返回的结果页面
layer.open({
type: 1,//弹出框类型
title: '传播层级用户详情',
shadeClose: false, //点击遮罩关闭层
area : ['60%' , '90%'],
shift:1,
content: htmlCont,//将结果页面放入layer弹出层中
success: function(layero, index){
}
});
}
});
注意:dataType:'html'为html类型,后台实现,如下:
@RequestMapping(value = "test")
public String test(Model model) {
return "modules/test/test";
}
return一个页面,例如上面的对应的视图为test.jsp