Click a button to pop up another interface and pass the value to another interface
After modifying the value in another interface, click the return button to return to the previous interface. How to pass the parameters to the previous interface at this time? ?
Using the mui framework, please solve it, thank you
Use
window.addEventListener('method name', function(event){
//The passed parameter content can be obtained through event.detail
});
on the page to be accepted to start event listening. Call
mui.fire(pageId,'method name',{}) on the page that needs to trigger the event;
The first parameter is the object that needs to accept the page, which can be obtained through plus.webview.getWebviewById('page id'),
The second is the name of the method that listens to the event,
The third is the parameters you want to pass, please see
Dear, do you think you want to draw me? However, this requirement is easy to handle. The key is to constantly monitor the operations on one page and then pass the value to another page for rendering!
For mui, there is a mui.fire method, you can check it out; the previous interface returned is the opener() of another interface
This is a problem of passing values in mui. There are many methods. It is recommended to use custom events to refresh the previous page. Detailed explanation of HTML5+ APP page parameter passing
Or use the simplest localstorage to pass the value
The answer using mui.fire is the correct answer