Начало
Пользовательские детали
Стол информации
JavaScript может написать небольшую коробку экрана, написав браузер посетителя и операционную систему.
JavaScript Стол информации
<!-- ONE STEP TO INSTALL INFO TABLE: 1. Put the coding into the BODY of your HTML document --> <!-- STEP ONE: Add this code into the HEAD of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin bName = navigator.appName; bVer = parseInt(navigator.appVersion); document.write("<center>"); if (bName == "Netscape" && bVer >=4) { document.write('<table border=1><tr><td>Netscape 4</td></tr>'); } else if (bName == "Netscape" && bVer >=3) { document.write('<table border=1><tr><td>Netcape 3</td></tr>'); } else if (bName == "Netscape" && bVer >=1) { document.write('<table border=1><tr><td>Netscape 2 or below</td></tr>'); } else if (bName == "Microsoft Internet Explorer" && bVer >=4) { document.write('<table border=1><tr><td>Internet Explorer 4</td></tr>'); } else if (bName == "Microsoft Internet Explorer" && bVer >=2) { document.write('<table border=1><tr><td>Internet Explorer 3</td></tr>'); } else document.write ("<table border=1>"); function isWin95() { if (navigator.appVersion.indexOf("95") !=-1) return true; else return false; } function isWin31() { if (navigator.appVersion.indexOf("16") !=-1) return true; else return false; } function isPPC() { if (navigator.appVersion.indexOf("PPC") !=-1) return true; else return false; } function isSun() { if (navigator.appVersion.indexOf("SunOS") !=-1) return true; else return false; } function isLinux() { if (navigator.appVersion.indexOf("Linux") !=-1) return true; else return false; } function isHP() { if (navigator.appVersion.indexOf("HP") !=-1) return true; else return false; } function isNT() { if (navigator.appVersion.indexOf("NT") !=-1) return true; else return false; } if (isWin95()) { document.write('<tr><td>Windows 95</td></tr></table>'); } else if (isWin31()) { document.write('<tr><td>Windows 3.1</td></tr></table>'); } else if (isPPC()) { document.write('<tr><td>MacOS</td></tr></table>'); } else if (isSun()) { document.write('<tr><td>SunOS</td></tr></table>'); } else if (isLinux()) { document.write('<tr><td>Linux</td></tr></table>'); } else if (isHP()) { document.write('<tr><td>HP-UX</td></tr></table>'); } else if (isNT()) { document.write('<tr><td>Windows NT</td></tr></table>'); } else document.write("</table>") document.write("</center>") // End --> </SCRIPT> <!-- Script Size: 2.60 KB -->