Javascript Level 7 - Getting Information from the Browser


Method 1: get Browser Information (get Browser name eg. Mozilla, Netscape)

<html>
<body>
<script type="text/javascript">

var name=navigator.appName;
document.write ("You're using" + name);

</script>
</body>
</html>

//navigator means web browser

Method 2: get Browser Information (get Browser name eg. Mozilla, Netscape)

<html>
<body>
<script type="text/javascript">

document.write ("You're using" + navigator.appName);

</script>
</body>
</html>


get Platform Information (eg. Window XP)

<html>
<body>
<script type="text/javascript">

document.write ("You're using" + navigator.platform);

</script>
</body>
</html>