-
-
Save mkhuda/fa7778bb64b0fcd8b754 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>HTML5 Navigator</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<link href="http://fonts.googleapis.com/css?family=Open+Sans+Condensed:700,300" rel="stylesheet" type="text/css"> | |
<link href="style.css" rel="stylesheet" type="text/css"> | |
<body> | |
<div class="top"> | |
</div> | |
<section id="wrapper"> | |
<header> | |
<h1>HTML5 Navigator Online</h1> | |
</header> | |
<section> | |
<h3>Kondisi Internet Anda: <span id="kondisi">checking...</span></h3> | |
<p>Cek dengan cara mematikan fitur online, jika di Mozilla Firefox (klik File -> Work Offline)</p> | |
<p>Atau dengan mematikan koneksi internet di Komputer Anda</p> | |
</section> | |
<script> | |
var status = document.getElementById('kondisi') | |
setInterval(function () { | |
status.className = navigator.onLine ? 'online' : 'offline'; | |
status.innerHTML = navigator.onLine ? 'online' : 'offline'; | |
}, 100); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment