代码如下
通过按钮进入后台,然后返回新页面包在iframe里面
第一次使用,不清楚具体操作
function edit_people_type() {
top.$.jBox.open("iframe:${ctx}/user/uidentity/peopleTypeList",
"人员分配列表",
510,
$(top.document).height()-240,{
buttons:{
"关闭":"ok"
},
submit:function(v, h, f){
//逻辑处理
return true;//关闭
}, loaded:function(h){
$(".jbox-content", top.document).css("overflow-y","hidden");
}
})
}
jsp页面ajax
$.ajax({
url:"${ctx}/user/uidentity/addPeopleType",
dataType:"json",
type:"post",
data: {"name":person},
contentType: "application/x-www-form-urlencoded",
beforeSend: function (XMLHttpRequest) {
//正在加载
}, success: function (d) {
}, error: function (jqXHR, textStatus, errorThrown) {
alert("状态:" + textStatus + ";错误描述:" + errorThrown + ";错误详情:" + jqXHR.responseText)
}, complete: function () {
//加载数据完成
}
})