在頁面中放入即可
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(); } } };
在頁面中放入即可
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(); } } };
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。