需求:點擊按鈕->彈出iframe窗體->在iframe中的列表中選區需要的用戶條目->確認並關閉窗體->在父級窗體中顯示剛才選取的用戶(刷新)。
layer.open({ type: 2 //此處以iframe舉例 , title: '名師列表' , area: ['800px', '600px'] , shade: 0 , maxmin: true , offset: 'auto'//顯示坐標-auto居中 , content:"{:url('admin/trainerlist')}" , btn: ['關閉'] , yes: function () { layer.closeAll(); // $(that).click(); } , zIndex: layer.zIndex //重點1 , success: function (layero) { layer.setTop(layero); //重點2 }, end: function () { window.location.reload(); } });
關鍵點在與end:function.....,用window.location.reload();來刷新頁面。
轉載:https://blog.csdn.net/blank__box/article/details/80944774?utm_source=blogxgwz0
----------------------------------------------------------------------------------------------------------------------------------------------------