2014年08月28日 | Wizzer | 评论 /** * Created by Wizzer on 14-8-28. */ var num = 0; var login = { initialize: function () { this.bindEvents(); }, bindEvents: function () { document.addEventListener('backbutton', this.eventBackButton, false); }, eventBackButton: function () { num++; if (num > 1) { navigator.app.exitApp(); } navigator.toast.show("再点击一次退出"); // 3秒后重新计数 var intervalID = window.setInterval(function() { num=0; window.clearInterval(intervalID); }, 3000); } }; 浮动提示插件见: /?p=3026 2,538 total views, 2 views today