layer框架頁面之間傳參


父頁面:
function kaipiao(ids) {
layer.open({
type: 2,
title: '開票',
maxmin: true,
shadeClose: false, // 點擊遮罩關閉層
area: ['1200px', '700px'],
content: prefix + '/kaipiao',
afterClose: function (VRetrun) {
layer.msg(VRetrun);

},
otherParams: {
ids: ids
}
});
}
子頁面:在初始加載中獲取
$(function){
var params = parent.layer.getParams();//取參數
if (params) {
unitguids = params.ids;
}
}
子頁面向父頁面傳參 通過layer.open 打開新窗口

var openCustomerselect = function () {
top.layer.open({
type: 2,
title: "選擇客戶",
area: ['1100px', '600px'],
content: "/manage/customer/customerselect",
afterClose: setCustomer,

})
}
function setCustomer(result) {
$("#customerguid").val(result.unitguid);
$("#customername").val(result.customername);
}
 
 
         
         
       


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM