1. 程式人生 > >easyui tabs 一個視窗修改完成後重新整理另一個視窗

easyui tabs 一個視窗修改完成後重新整理另一個視窗

在一個tab中新增或刪除資料後,要改變主頁(相當於連結的另一個tab)的內容:

1、在要重新整理的視窗的初始化中新增 js 重新整理方法,並儲存到 window.top 中

  window.top["Refresh_CloudHomePage_Content"] = function () {
    window.location.reload();
  }

2、在主頁新增重新整理方法

  function RefreshCloudHomePageTab(title) {
    if ($("#tabMenu").tabs('exists', title)) {
      $('#tabMenu').tabs('select', title);
      window.top.Refresh_CloudHomePage_Content.call();
    }
  }

3、在另一個 tab 資料處理完成之後執行主頁的重新整理方法

  parent.RefreshCloudHomePageTab("主頁");