MUI之安卓点击返回键提示退出应用APP 等....

在页面中放入即可  

    var first = null;  
    mui.back=function(){
    if(!first){  
         first = new Date().getTime();  
             mui.toast('再按一次退出应用');  
                setTimeout(function(){  
                    first = null;  
                },2000);  
              } else {  
                  if(new Date().getTime() - first < 2000){  
                     plus.runtime.quit();  
                   }  
              }  
       };

  

posted @ 2018-11-01 17:00  伴月阁  阅读(1419)  评论(0编辑  收藏  举报