<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<link rel= "stylesheet" type= "Text/css" href= "Css/mui.css"/>
<style type= "Text/css" >
. mui-card-content{
padding-bottom:20px;
}
button{
margin-top:20px;
margin-left:20px;
}
</style>
<body>
<div class= "Mui-card" >
<!--header, placing the title---
<div class= "Mui-card-header" > Header </div>
<!--content area--
<div class= "Mui-card-content" >
<button type= "button" class= "mui-btn mui-btn-blue mui-btn-outlined" id= "alertbtn" > Warning box </button>
<button type= "button" class= "mui-btn mui-btn-blue mui-btn-outlined" id= "confirmbtn" > Confirmation box </button>
<button type= "button" class= "mui-btn mui-btn-blue mui-btn-outlined" id= "promptbtn" > Input dialog Box </button>
<button type= "button" class= "mui-btn mui-btn-blue mui-btn-outlined" id= "toastbtn" > Auto vanishing Prompt box </button>
</div>
<!--footer, placing supplemental information or supported actions--
<div class= "Mui-card-footer" > Footer </div>
</div>
<!--<script src= ". /jquery-2.1.0.js "type=" Text/javascript "charset=" Utf-8 "></script>-->
<script src= "Js/mui.js" type= "Text/javascript" charset= "Utf-8" ></script>
<script type= "Text/javascript" >
Mui.init ({
Swipeback:true,//enable right slide off function
Beforeback:function () {//Listen for physical return key method
Get the WebView of the list interface
var list = plus.webview.getWebviewById (' list ');
Triggers a custom event (refresh) of the list interface for data refresh
Mui.fire (list, ' Refresh ');
Returns true to continue the page close logic
return true;
}
});
document.getElementById ("Alertbtn"). AddEventListener (' tap ', function () {
Mui.alert (' Welcome to Hello Mui ', ' Hello Mui ', function () {
Mui.toast (' You just closed the warning box ')
});
});
document.getElementById ("Confirmbtn"). AddEventListener (' tap ', function () {
var btnarray = [' No ', ' yes '];
Mui.confirm (' MUI ' is a good frame, OK? ', ' Hello MUI ', Btnarray, function (e) {
if (E.index = = 1) {
Mui.toast (' You just confirmed that MUI is a good frame ')
} else {
Mui.toast (' MUI does not get your approval, continue refueling ')
}
})
});
document.getElementById ("Promptbtn"). AddEventListener (' tap ', function (e) {
E.detail.gesture.preventdefault (); Fixed a bug in iOS 8.x platform, using plus.nativeUI.prompt will cause the input method flash and gone.
var btnarray = [' Cancel ', ' OK '];
Mui.prompt (' Please enter your comments on MUI: ', ' good performance ', ' Hello MUI ', Btnarray, function (e) {
if (E.index = = 1) {
Mui.toast (' Thank you for your comments: ' + e.value ')
} else {
Mui.toast (' You clicked the Cancel button ')
}
})
});
document.getElementById ("Toastbtn"). AddEventListener (' tap ', function () {
Mui.toast (' Welcome to the Hello MUI ');
});
</script>
</body>
MUI monitors physical return keys for Android phones and some common configurations