In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how phonegap listens to other events after the deviceready event is triggered. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
In any PhoneGap project, you should first listen for the deviceready event. Event triggering indicates that the DOM has been loaded and the PhoneGapAPI has been loaded, and other events can be detected or processed at this time.
Other events:
PhoneGap resume Example document.addEventListener ("deviceready", onDeviceReady,false); function onDeviceReady () {/ / register event listener document.addEventListener ("resume", onResume,false) Document.addEventListener ("pause", onPause,false); document.addEventListener ("menubutton", onMenuButton,false); document.addEventListener ("backbutton", onBackButton,false); document.addEventListener ("searchbutton", onSearchButton,false); document.addEventListener ("online", isOnline,false); document.addEventListener ("offline", isOffline,false) } / / handle recovery event function onResume () {alert ("page recovery");} / / handle pause event function onPause () {alert ("page pause") } / / process menu button function onMenuButton () {alert ("Click menu button");} / / process return button function onBackButton () {alert ("Click back button") } / / process search button function onSearchButton () {alert ("Click search button") } / / handle online events (connect to Internet) function isOnline () {alert ("Network connection") } / / handle offline events (disconnect Internet connection) function isOffline () {alert ("Network disconnected)" } this is the end of this article on "how phonegap listens for other events triggered by deviceready events". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.