Navigator onLine Property - all navigator properties in one example: - Javascript Browser Object Model

Javascript examples for Browser Object Model:Navigator

Description

Navigator onLine Property - all navigator properties in one example:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<div id="demo"></div>

<script>
var txt = "";
txt += "<p>Browser CodeName: " + navigator.appCodeName + "</p>";
txt += "<p>Browser Name: " + navigator.appName + "</p>";
txt += "<p>Browser Version: " + navigator.appVersion + "</p>";
txt += "<p>Cookies Enabled: " + navigator.cookieEnabled + "</p>";
txt += "<p>Browser Language: " + navigator.language + "</p>";
txt += "<p>Browser Online: " + navigator.onLine + "</p>";
txt += "<p>Platform: " + navigator.platform + "</p>";
txt += "<p>User-agent header: " + navigator.userAgent + "</p>";

document.getElementById("demo").innerHTML = txt;
</script>//w ww  .jav a 2  s.  c o  m

</body>
</html>

Related Tutorials