x
1
2
<html>
3
<body>
4
5
<h1>JavaScript Window Navigator Browser Online</h1>
6
<p id="onLine">onLine property returns true if the browser is online</p>
7
<script>
8
document.getElementById("onLine").innerHTML =
9
"navigator.platform is " + navigator.onLine;
10
</script>
11
12
</body>
13
</html>