Haku
Sponsorit

Arkisto ajaksi 'käyttäjä info Kategoria

Näyttö selaimen nimi

Keskiviikko, 18 helmikuu 2009

Näyttö selaimen nimi

<body>
<html>
<head>
<script LANGUAGE="JavaScript">
toiminto browserName ()
(
alert (navigator.appCodeName);
)
</ Script>
</ Head>
<body>
<input type="button" value="Browser Name" onClick="browserName();">
</ Body>
</ Html>

</ Body>
</ Html>

Selaimen kieli

Keskiviikko, 18 helmikuu 2009

Tämä esimerkki näyttää kieliasetus selaimen, huomaa, että tämä tuottaa "en-us" Internet explorer ja "epämääräinen" Firefox on minun testi PC.

<script LANGUAGE="JavaScript">
var lang = navigator.browserLanguage;
alert ("kieli selaimesi "+'"'+ lang +'"')
</ Script>

Uudelleenohjaus on Java

Perjantai, 09 tammikuu 2009

<SCRIPT LANGUAGE="JavaScript">
<! - Begin
if (navigator.javaEnabled ())
window.location = "java-page.phpl";
muu
window.location = "ei-java-page.phpl";
/ / End ->
</ Script>

Selaimen ja käyttöjärjestelmän tiedot

Perjantai, 09 tammikuu 2009

Tämä luultavasti on saatettava ajan tasalle

<script LANGUAGE="JavaScript">
<! - Alkuperäinen: Tšad Cunningham <ccunning@socrates.mps.ohio-state.edu> ->
<! - Web-sivusto: http://socrates.mps.ohio-state.edu/ ~ ccunning ->
<! - 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>");
)
if (bName == "Netscape" & & bVer> = 3) (
document.write ("<table border=1> <tr> <td> Netcape 3 </ td> </ tr>");
)
if (bName == "Netscape" & & bVer> = 1) (
document.write ("<table border=1> <tr> <td> Netscape 2 tai alle </ td> </ tr>");
)
if (bName == "Microsoft Internet Explorer" & & bVer> = 4) (
document.write ("<table border=1> <tr> <td> Internet Explorer 4 </ td> </ tr>");
)
if (bName == "Microsoft Internet Explorer" & & bVer> = 2) (
document.write ("<table border=1> <tr> <td> Internet Explorer 3 </ td> </ tr>");
)
muuten document.write ("<table border=1>");

toiminto isWin95 () (
jos (navigator.appVersion.indexOf (95 ")! =- 1)
return true;
else return false;
)
toiminto isWin31 () (
jos (navigator.appVersion.indexOf (16 ")! =- 1)
return true;
else return false;
)
toiminto isPPC () (
jos (navigator.appVersion.indexOf (PPC)! =- 1)
return true;
else return false;
)
toiminto isSun () (
jos (navigator.appVersion.indexOf (SunOS)! =- 1)
return true;
else return false;
)
toiminto isLinux () (
jos (navigator.appVersion.indexOf (Linux)! =- 1)
return true;
else return false;
)
toiminto isHP () (
jos (navigator.appVersion.indexOf ("HP")! =- 1)
return true;
else return false;
)
toiminto isNT () (
jos (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> ');
)
muuten document.write ("</ table>")
document.write ("</ center> ')
/ / End ->
</ Script>

Selaimen ominaisuudet

Perjantai, 09 tammikuu 2009

head-osioon

<SCRIPT LANGUAGE="JavaScript">
<! - Alkaa
toiminto näyttää () (
window.onerror = null;

värit = window.screen.colorDepth;
document.form.color.value = Math.pow (2, värit);
if (window.screen.fontSmoothingEnabled == true)
document.form.fonts.value = "Kyllä";
muuten document.form.fonts.value = "Ei";

document.form.navigator.value = navigator.appName;
document.form.version.value = navigator.appVersion;
document.form.colordepth.value = window.screen.colorDepth;
document.form.width.value = window.screen.width;
document.form.height.value = window.screen.height;
document.form.maxwidth.value = window.screen.availWidth;
document.form.maxheight.value = window.screen.availHeight;
document.form.codename.value = navigator.appCodeName;
document.form.platform.value = navigator.platform;
if (navigator.javaEnabled () <1) document.form.java.value = "Ei";
if (navigator.javaEnabled () == 1) document.form.java.value = "Kyllä";

if (navigator.javaEnabled () & & (navigator.appName! = "Microsoft Internet Explorer")) (
vartool = java.awt.Toolkit.getDefaultToolkit ();
addr = java.net.InetAddress.getLocalHost ();
host = addr.getHostName ();
ip = addr.getHostAddress ();
alert ("Koneesi nimi on" "+ isäntä +" "\ nYour IP-osoite on" + ip);
)
)
/ / End ->
</ Script>

elimistössä osa

<center>
<form name=form>
<table border=1 width=300>

<tr>
<td> nykyinen resoluutio: </ td>
<td align=center> <input type=text size=4 maxlength=4 name=width>
x <input type=text size=4 maxlength=4 name=height> </ td>
</ P>

<tr>
<td>
selain: </ td>
<td align=center> <input type=text size=20 maxlength=20 name=navigator> </ td>
</ P>
<tr>
<td>
Max resoluutio: </ td>
<td align=center> <input type=text size=4 maxlength=4 name=maxwidth>
x <input type=text size=4 maxlength=4 name=maxheight> </ td>
</ P>

<tr>
<td>
versio: </ td>
<td align=center> <input type=text size=20 maxlength=20 name=version> </ td>
</ P>

<tr>
<td>
värisyvyys: </ td>
<td align=center> <input type=text size=2 maxlength=2 name=colordepth> vähän </ td>
</ P>

<tr>
<td>
koodinimi: </ td>
<td align=center> <input type=text size=15 maxlength=15 name=codename> </ td>
</ P>

<tr>
<td>
foorumi: </ td>
<td align=center> <input type=text size=15 maxlength=15 name=platform> </ td>
</ P>

<tr>
<td>
värit: </ td>
<td align=center> <input type=text size=8 maxlength=8 name=color> </ td>
</ P>

<tr>
<td>
Java käytössä: </ td>
<td align=center> <input type=text size=3 maxlength=3 name=java> </ td>
</ P>

<tr>
<td>
anti-aliasing fonts: </ td>
<td align=center> <input type=text size=3 maxlength=3 name=fonts> </ td>
</ P>

<tr>
<td colspan=2 align=center>
<input type=button name=again value="again?" onclick="display()"> </ td>
</ P>
</ Table>
</ Form>
</ Center>

muokata body

<BODY OnLoad="display()">

Kääntää