JavaScript Reference/Javascript Properties/onLine

Материал из Web эксперт
Перейти к: навигация, поиск

"onLine" Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
   var m = navigator.onLine;
   alert("The onLine value is: \n"+m); 
} 
</script>
<input type="Button" value="Get the onLine value" onClick="function1();">
</body>
</html>



"onLine" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |clientInformation               navigator                     |
+----------------+--------------------------------------------------------------+



"onLine" Possible Values

Possible Values
true
false.



"onLine" Syntax and Note

Note:
Read-only property. 
Is a browser online. 
    
Syntax:
    
objectName.onLine