Google search

Basic and advanced computer skills like Excel with macros, How to speed up your PC, C, CPP, Java programming, HTML, JavaScript, PHP, Wordpress, all web tools, Android tutorials, MySQL Tutorials, WAMP server installation. etc.

internet connection status check

This java script example demonstrates that,  whether your browser is online or offline.
<html>
<head>
</head>
<body>
<h1> Check internet connection status </h1>
 <script>
    function status()
    {
        if(navigator.onLine)
        {
alert("You are Online!")
}
        else
        {
alert("You are Offline!")
        }
    }

</script>
<button onclick="status();">check internect connection 

status </button>
<br>
<h1> This is refresh code </h1>
<a href="javascript:location.reload(true)">Refresh 

Now!</a>
</script>
</body>
</html>

Out put of the above code is : 














No comments:

Post a Comment