»
Tiếng AnhTiếng PhápTiếng Việt

In - Thông tin hệ thống và trình duyệt - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Thông tin hệ thống và trình duyệt
URL: https://www.javascriptbank.com/full-system-browser-info.html

Thông tin hệ thống và trình duyệt © JavaScriptBank.comMột đoạn mã JavaScript JavaScript khác để hiển thị thông tin về trình duyệt và cấu hình hệ thống của máy khách.

Phiên bản đầy đủ: jsB@nk » Trình duyệt » Thông tin hệ thống và trình duyệt
URL: https://www.javascriptbank.com/full-system-browser-info.html



HTML
<SCRIPT language=Javascript> <!-- SCRIPT BY DANIEL ALLOWAY COPYRIGHT (C) DANIEL ALLOWAY, 2002 ALL RIGHTS RESERVED// Browser Name     bn = navigator.appName;// CPU Class     if(bn.toLowerCase() != "microsoft internet explorer")         cpu = "Don't Know";     else         cpu = navigator.cpuClass;// Browser Version     if(bn.toLowerCase() == "microsoft internet explorer")     {         bv1 = navigator.appVersion.indexOf("MSIE") + 5;         bv2 = (bv1 + 3);         bv  = navigator.appVersion.substring(bv1,bv2);     }     else if(bn.toLowerCase() == "opera")     {         bv1 = navigator.appVersion.indexOf("(") - 4;         bv2 = (bv1 + 3);         bv  = navigator.appVersion.substring(bv1,bv2);     }     else if(bn.toLowerCase() == "netscape")     {         bv1 = navigator.appVersion.indexOf("(") - 5;         bv2 = (bv1 + 4);         bv  = navigator.appVersion.substring(bv1,bv2);     }// Application Code  Name     bc = navigator.appCodeName;// Browser Language     bl = navigator.browserLanguage;// Operating System  if(bn.toLowerCase() == "microsoft internet explorer")  {     if(navigator.userAgent.indexOf('IRIX') != -1)         OpSys = "Irix";     else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('98') != -1))         OpSys = "Windows 98 or greater";     else if((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('95') != -1))         OpSys = "Windows 95";     else if(navigator.appVersion.indexOf("16") !=-1)         OpSys = "Windows 3.1";     else if (navigator.appVersion.indexOf("NT") !=-1)         OpSys= "Windows NT";     else if(navigator.appVersion.indexOf("SunOS") !=-1)         OpSys = "SunOS";     else if(navigator.appVersion.indexOf("Linux") !=-1)         OpSys = "Linux";     else if(navigator.userAgent.indexOf('Mac') != -1)         OpSys = "Macintosh";     else if(navigator.appName=="WebTV Internet Terminal")         OpSys="WebTV";     else if(navigator.appVersion.indexOf("HP") !=-1)         OpSys="HP-UX";     else         OpSys = "other";  }  else  {        OpSys = navigator.platform;        if(OpSys.toLowerCase() == "win32")            OpSys = "Windows";        else            OpSys = "Other";  }// Java Detection     if(navigator.javaEnabled())         java = "Yes";     else         java = "No";// Anti-alisaing Fonts     if(window.screen.fontSmoothingEnabled == true)         font = "Yes"     else         font = "No"// Current Resolution     w = screen.width;     h = screen.height;     res = w + " x " + h;// Max Resolution     mw = window.screen.availWidth;     mh = window.screen.availHeight;     mres = mw + " x " + mh;// Color Depth (bit)     color = window.screen.colorDepth;// Number Of Colors     ncolor = Math.pow(2, color);// Write it all to the body        document.write("<table border='0' bgcolor='#476078' width='400' cellpadding='2' cellspacing='1'>");        document.write("<tr><td bgcolor='#1B2936' colspan='2' align='center'><small>Script by Daniel Alloway<br>");        document.write("<a href='http://h2osmash.tripod.com' target='_blank'>http://h2osmash.tripod.com</a></small></td></tr>");        document.write("<tr><td bgcolor='#223544'>CPU Class: </td>");        document.write("<td bgcolor='#444444'>", cpu ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Operating System: </td>");        document.write("<td bgcolor='#444444'>", OpSys ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Browser Name: </td>");        document.write("<td bgcolor='#444444'>", bn ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Browser Version: </td>");        document.write("<td bgcolor='#444444'>", bv ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Browser Language: </td>");        document.write("<td bgcolor='#444444'>", bl ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Code Name: </td>");        document.write("<td bgcolor='#444444'>", bc ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Java?: </td>");        document.write("<td bgcolor='#444444'>", java ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Cookies?: </td>");var oneDay= 1*24*60*60*1000;var expDate = new Date();expDate.setTime (expDate.getTime() + oneDay);var cookieExpires = expDate.toGMTString();document.cookie="verifyCookie=test; expires="+cookieExpiresif (document.cookie.length>0)document.write("<td bgcolor='#444444'>Your browser supports cookies.</td>");else {document.write("<td bgcolor='#444444'>Your browser doesn't support cookies, or they're currently disabled.</td>");document.write(document.cookie.substring(0,document.cookie.length)+"<BR><BR>");}document.cookie="verifyCookie=CLEAR; expires=Sun, 09-Nov-97 01:00:00 GMT";        document.write("<tr><td bgcolor='#223544'>Anti-aliasing Fonts: </td>");        document.write("<td bgcolor='#444444'>", font ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Current Resolution: </td>");        document.write("<td bgcolor='#444444'>", res ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Max Resolution: </td>");        document.write("<td bgcolor='#444444'>", mres ,"</td></tr>");        document.write("<tr><td bgcolor='#223544'>Color Depth: </td>");        document.write("<td bgcolor='#444444'>", color ," bit</td></tr>");        document.write("<tr><td bgcolor='#223544'># of Colors: </td>");        document.write("<td bgcolor='#444444'>", ncolor ,"</td></tr>"); //--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->