HTML5 Development app (some features of MUI)

Source: Internet
Author: User

First MUI document address: http://dev.dcloud.net.cn/mui/ui/. MUI's UI components are relatively simple and easy to find in documents, and not too much to say.

1 in app development, using the html5+ API, you must mui.plusready the method.

2 commonly used a tags and window.herf jump method to change to

Mui.openwindow ({
URL: ' File path ',
ID: ' ID of the file you own '
})

3 Ajax sections. The MUI itself encapsulates the Ajax that can be crossed. Broadly similar to the JQ Ajax

Mui.ajax ({
URL: "",
Type: ',
Data: {},
DataType: ' JSON ',
Success:function (Result) {
}
});

Note that data is transmitted in a slightly different way. Data: {Id:id,bank:bank} is preceded by a field that is pre-booked with the background, followed by the value to be passed.

4 Refreshes the parent page. Is that you jump from A to B, and then you go back to a,a and the data changes.

First, when the child page is initialized, the Beforeback method is registered;

Mui.init ({

Beforeback:function () {

Gets the list interface of the webview var list = Plus.webview.currentWebview (). opener ();

// trigger a custom event (refresh) for the list interface for data refresh

Mui.fire (list, ' Refresh ');

Returns true to continue the page shutdown logic return true;

}

});

To add an event listener to the parent page

Window.addeventlistener (' Refresh ', function (e) {

Location.reload ();

document.getElementById (' Indexheader '). InnerHTML = ' Hello world ';

})



HTML5 Development app (some features of MUI)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.