layui關閉iframe彈出層后刷新父級頁面


需求:點擊按鈕->彈出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

 

----------------------------------------------------------------------------------------------------------------------------------------------------

 

 


免責聲明!

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



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