Javascript examples for DOM Event:addEventListener
The ononline event occurs when the browser starts to work online.
Bubbles | No |
---|---|
Cancelable | No |
Supported HTML tags: | <body> |
<!DOCTYPE html> <html> <body> <script> window.addEventListener("online", onFunction); window.addEventListener("offline", offFunction); function onFunction() {//from w w w .j a v a2 s . c o m console.log("Your browser is working online."); } function offFunction() { console.log("Your browser is working offline."); } </script> </body> </html>