Information about visitor's browser

Written by @kerixa 21 August 2012

This is an application that shows the information related to your browser. It shows different information such as the name of browser, version of the browser. It shows the information in a text box so it is very sufficient.

Code Snippet:

                                                
                                                <!-- this script is provided by https://www.javascriptfreecode.com coded by: Kerixa Inc. -->
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title></title>
</head>

<body>

<head><script>

 function CC_getBrowserName()   {   
         document.forms[0].elements[0].value =navigator.appName;     
 }

 function CC_getBrowserVersion()   {   
         document.forms[0].elements[0].value =  navigator.appVersion;     
 }

 function CC_getBrowserCodeName()   {   
         document.forms[0].elements[0].value = navigator.appCodeName;     
 }

 function CC_getBrowserUserAgent()   {   
         document.forms[0].elements[0].value =  navigator.userAgent;     
 }

 function CC_getBrowserNameVersion()   {   
         document.forms[0].elements[0].value = navigator.appName + " " + navigator.appVersion;     
 }


 </script>
 </head>
 <center>
 
<center>
 <form NAME="detect">
 <input TYPE="text" NAME="browser" SIZE="26" MAXLENGTH="40" VALUE="Browser Detection"><br>
 <br><br>Choose a button to reveal your browser's self image.<br>
 <input TYPE="button" VALUE="appName" onClick="CC_getBrowserName()">
 <input TYPE="button" VALUE="appVersion" onClick="CC_getBrowserVersion()">
 <input TYPE="button" VALUE="appCodeName" onClick="CC_getBrowserCodeName()">
 <input TYPE="button" VALUE="userAgent" onClick="CC_getBrowserUserAgent()">
 <input TYPE="button" VALUE="appName / appVersion" onClick="CC_getBrowserNameVersion()"><br><br><br>
 </form>
 </center><p><a target='_blank' href='https://www.javascriptfreecode.com' style='font-size: 8pt; text-decoration: none'>JavaScript Best Codes</a>                                                
                                            

Example:


About @kerixa

I am Krishna Eydat. I studied Software Engineering at University of Waterloo in Canada. I lead a few tech companies. I am passionate about the way we are connected. I would like to be part of something big or be the big deal!

K

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: AstroAudrey, admin_js, bloxio, yqaice, flooketsu
advertisement 2