showing results for - "no internet connection html page"
Hafsa
25 Aug 2016
1if (navigator.onLine) {
2  console.log("You are online");
3} else {
4  console.log("You are offline");
5}
6
Oscar
11 Mar 2018
1window.addEventListener("online", function() {
2  alert("You are online now!");
3});
4
5window.addEventListener("offline", function() {
6  alert("Oops! You are offline now!");
7});