gpt4 book ai didi

jquery - 如何在phonegap+jquery mobile中刷新或重置应用程序?

转载 作者:行者123 更新时间:2023-12-03 22:50:32 25 4
gpt4 key购买 nike

我正在开发一个应用程序,其中用户需要在设置页面上设置一些参数,然后用户移动 slider (位于应用程序的主页上),结果显示在主页上。但执行计算后,当我按下 iPhone 模拟器的主页按钮并再次打开应用程序时。它显示相同的选定设置和所有内容。我应该如何刷新它或重置所有内容?

最佳答案

您可以将事件处理程序绑定(bind)到 PhoneGap 公开的 pauseresume 事件。文档可以在这里找到:http://docs.phonegap.com/en/1.2.0/phonegap_events_events.md.html#Events

Resume

This is an event that fires when a PhoneGap application is retrieved from the background.

function onResume() {
//run code to reset your app here
}

document.addEventListener("resume", onResume, false);

关于jquery - 如何在phonegap+jquery mobile中刷新或重置应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8185565/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com