layui提交成功之后刷新當前頁、關閉當前頁、刷新父頁、重載父頁數據表格


刷新當前頁:

layer.msg(data.msg, {icon:1,time:1000},function(){
    setTimeout('window.location.reload()',1000);
});

關閉當前頁,並刷新父頁

layer.msg(data.msg, {icon:1,time:1000}, function(){
    var index = parent.layer.getFrameIndex(window.name);
    //parent.location.reload(); //刷新父頁面
    parent.layer.close(index);
});    

重載父頁數據表格

var index = parent.layer.getFrameIndex(window.name);
parent.layui.table.reload('items');//重載父頁表格,參數為表格ID
parent.layer.close(index);

原文鏈接:https://blog.csdn.net/gdali/article/details/85038857


免責聲明!

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



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