Home  >  Article  >  Web Front-end  >  mui js returns method example code for refreshing the page

mui js returns method example code for refreshing the page

小云云
小云云Original
2018-02-27 14:43:513453browse

This article mainly shares with you the example code of the method of mui j returning to refresh the page. I hope it can help you.

mui js return refresh page method currently only knows the following

mui.plusReady(function() {
	var primaryBack = mui.back;
        mui.back = function() {
           var wobj = plus.webview.getWebviewById("这里填写跳转页面的id");   
           wobj.reload(true);
           primaryBack();
       }
})

The above is used when clicking the return button on the phone or clicking the return button at the top of mui,

<br/>
var wobj = plus.webview.getWebviewById(&#39;这里填写跳转页面的id&#39;);
if(wobj!=null){
   wobj.reload(true);
}
mui.back();

the above It is used when jumping to the page and refreshing it after requesting data. It does not need to be triggered by back.

In fact, it is relatively simple to understand. It is to specify the page, reload, and return.

Related recommendations:

Javascript refresh page method and location.reload() usage introduction

Detailed example of refreshing page in Javascript

Using JavaScript Tutorial on how to preview and upload images without refreshing the page

The above is the detailed content of mui js returns method example code for refreshing the page. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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