Articles → JavaScript → Check If User Is Connected To Internet Or Not In Javascript

Check If User Is Connected To Internet Or Not In Javascript






Navigator.Online





Example


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta charset="utf-8" />
	<title></title>
	<script>
	alert(navigator.onLine);
	</script>
</head>

<body> </body>

</html>

Try It




Posted By  -  Karan Gupta
 
Posted On  -  Saturday, January 28, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250