在页面中放入即可
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删除。