Layui method of refreshing the current tab: You can use the reload method to refresh, such as [location.reload();]; the reload method is used to refresh the current document. The function of this method is similar to that of a browser. The function of the refresh page button.
The operating environment of this tutorial: Windows 10 system, layui version 2.5.6. This method is suitable for all brands of computers.
Layui method of refreshing the current tab:
(Learning video sharing: javascript video tutorial)
Method:
location.reload();
Description:
reload()
method is used to refresh the current document. reload()
The method is similar to the refresh page button on your browser.
If you set the parameter of this method to true, it will bypass the cache and re-download the document from the server regardless of the last modification date of the document. This method has the exact same effect as if the user holds down the Shift key while clicking the browser's refresh button.
Example:
table.reload('testReload', {//testReload是组件名称,表格名 page: {//page参数是指重新刷新后从第几页开始 curr: 1 //重新从第 1 页开始 } ,where: {//where是指你要往后台发的参数的键值对,可以不加key{} key: { id: demoReload.val() } } }, 'data');//data是默认值
Related recommendations:layui
The above is the detailed content of How to refresh the current tab in layui. For more information, please follow other related articles on the PHP Chinese website!