Home > Web Front-end > Layui Tutorial > How to refresh the current tab in layui

How to refresh the current tab in layui

王林
Release: 2020-11-30 11:56:05
Original
6497 people have browsed it

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.

How to refresh the current tab in layui
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();
Copy after login

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是默认值
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template