Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library

 

Category: Javascript Codes Library >> Miscellaneous Snippets >> Browser Detection >> Browser Information


Code Snippet </> Info


Snippet Name: Browser Information

Description: A simple script that prints out the end users browser information.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser


Example: View Code Demo

Note: Select the type of code you want to use... then paste the snippet where you want it to appear.

Author: Snap Builder <snippets@snapbuilder.com>

Last Modified: 2019-12-09 21:59:27

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor


  About Copying
Copied To Clipboard!

<html> <head> <title>Browser Information</title> </head> <body> <center> TABLE code snippet </center> <br /><br /> <script> <!-- Begin Browser Information Table /* == This Script Free To Use Providing This Notice Remains == */ /* == This Script Has Been Found In The https://snapbuilder.com Free Public Codes Library == */ /* == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == */ var xy = navigator.appVersion; xz = xy.substring(0,4); document.write("<center><table border='1' cellpadding='2'><tr><td>"); document.write("<center><b>", navigator.appName,"</b>"); document.write("</td></tr><tr><td>"); document.write("<center><table border='1' cellpadding='2'><tr>"); document.write("<td>Code Name: </td><td><center>"); document.write("<b>", navigator.appCodeName,"</td></tr>"); document.write("<tr><td>Version: </td><td><center>"); document.write("<b>",xz,"</td></tr>"); document.write("<tr><td>Platform: </td><td><center>"); document.write("<b>", navigator.platform,"</td></tr>"); document.write("<tr><td>Pages Viewed: </td><td><center>"); document.write("<b>", history.length," </td></tr>"); document.write("<tr><td>Java enabled: </td><td><center><b>"); if (navigator.javaEnabled()) document.write("Yes</td></tr>"); else document.write("not today</td></tr>") document.write("<tr><td>Screen Resolution: </td><td><center>"); document.write("<b>",screen.width," x ",screen.height,"</td></tr>"); document.write("</table></tr></td></table></center>"); // End --> </script> <center> <br /><br /> DIV code snippet <br /><br /> <style> #browinfo{width:250px;border:1px solid #444;padding:10px 10px 10px 10px;font-family:arial,verdana;font-size:13px;font-weight:normal;text-align:left;background-color:#eee;color:#444444;} b{font-family:arial,verdana;font-size:13px;font-weight:bold;color:#007730;} </style> <script> <!-- Begin Browser Information DIV /* == This Script Free To Use Providing This Notice Remains == */ /* == This Script Has Been Found In The http://www.SnapBuilder.com Free Public Codes Library == */ /* == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == */ var xy = navigator.appVersion; xz = xy.substring(0,4); document.write("<div id=\"browinfo\">Navigator: <b>", navigator.appName,"</b><br />"); document.write("Code Name: <b>", navigator.appCodeName,"</b><br />"); document.write("Version: <b>",xz,"</b><br />"); document.write("Platform: <b>", navigator.platform,"</b><br />"); document.write("Pages Viewed: <b>", history.length," </b><br />"); document.write("Java enabled: <b>"); if (navigator.javaEnabled()) document.write("Yes</b><br/>"); else document.write("No</b><br />") document.write("Screen Resolution: <b>",screen.width," x ",screen.height,"</b><br />"); document.write("</div>"); // End --> </script> </center> <br /><br /> <div id="snippet"> [ This code example from <a href="http://snapbuilder.com/code_snippets/copy_code_snippet_245.html">Browser Information</a> page. ] </div> </body> </html>


[ Snippet Options ]

 

© 2002 -  Snap Builder Public Codes Library