Home > Article > Web Front-end > How to use easyui to refresh the data of the specified tab page
Use tab management in Home/Index and set a refresh method in the home page.
/** * 刷新指定的tab里面的数据 * @param title 选项卡标题 * @param refreshTabFunc 自定义的刷新方法(再各个页面具体实现) */ function refreshTabData(title,refreshGridFunc) { if ($("#tabs" ).tabs('exists', title)) { $('#tabs').tabs('select' , title); typeof refreshGridFunc === 'function' && refreshGridFunc.call(); } }
Customize your own refresh method for the page to be refreshed, refresh the data, etc.
I define it in the task interface Task/Index.js:
window.top["reload_taskTab"] = function () { datagrid.reload("#task_tab"); };
The method is stored in the window.top attribute, and the name of the method is reload_taskTab. The specific implementation code is written in it.
I updated the task information in Task/Edit.js, then I have to refresh the datagrid table data in the task list tab page.
Then after editing is completed, just write:
window.parent.refreshTabData("任务列表",window.top.reload_taskTab);
The above is the detailed content of How to use easyui to refresh the data of the specified tab page. For more information, please follow other related articles on the PHP Chinese website!