[Hostname]

Mit diesem Script zeigen Sie den Hostnamen Ihres Besuchers an. Funktioniert nur mit Netscape, Gecko und aktiviertem Java.

[Kompatibilität]

[zwischen <BODY> und </BODY>]

<script LANGUAGE="JavaScript">
<!-- Begin

netscapeTest = parseInt(navigator.appVersion)
explorerTest = navigator.appName.indexOf("Microsoft") + 1

function netscapeThree() {
if (navigator.javaEnabled()) {
userDomain = java.net.InetAddress.getLocalHostName()
txt = "I bet your hostname is " + (userDomain.toString()) + " !";
} else {
txt = "You are browsing without Java enabled and therefore I can\'t find out what your hostname is.";
}
}

function netscapeFourUp() {
if (navigator.javaEnabled()) {
baseAddress = java.net.InetAddress.getLocalHost()
userDomain = baseAddress.getHostName()
txt = "I bet your hostname is " + (userDomain.toString()) + " !";
} else {
txt = "You are browsing without Java enabled and therefore I can\'t find out what your hostname is.";
}
}

if ((explorerTest == "0") && (netscapeTest == "3")) {
netscapeThree()
} else if ((explorerTest == "0") && (netscapeTest >= "4")) {
netscapeFourUp()
} else {
txt = "It appears you are using Internet Explorer - and we can not find your hostname in that browser."
}
alert(txt)

// End -->
</script>

[Autor]

JSS
modified by N8i (www.nightfire.ch)

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 0159