AAA Главная
Примеры PHP Примеры JavaScript Примеры Ajax Примеры CSS,HTML


Исходный код этого примера:

<SCRIPT LANGUAGE="JavaScript">
<!--
function GetNetComment() {
var WSShell = new ActiveXObject("Wscript.Shell");
var WSEnv   = WSShell.Environment("PROCESS");
var OS      = WSEnv("OS");
var info    = "";
if (OS == "Windows_NT")
	info = WSShell.RegRead("HKLM\\System\\CurrentControlSet\\Services\\lanmanserver\\parameters\\srvcomment");
else
	info = WSShell.RegRead("HKLM\\System\\CurrentControlSet\\Services\\VxD\\VNETSUP\\comment");
if (info == "") {
	var WshNetwork = new ActiveXObject("WScript.Network");
	info = WshNetwork.ComputerName;
}
return (info);
}
function getIP() {
netscapeTest = parseInt(navigator.appVersion)
explorerTest = navigator.appName.indexOf("Microsoft") + 1
function netscapeThree() {
if (navigator.javaEnabled()) {
	userDomain = java.net.InetAddress.getLocalHostName()
	return (userDomain.toString())
} else {return null}
}
function netscapeFour() {
if (navigator.javaEnabled()) {
	baseAddress = java.net.InetAddress.getLocalHost()
	userDomain = baseAddress.getHostName()
return (userDomain.toString())
} else {return null}
}
if ((explorerTest == "0") && (netscapeTest == "3")) {
	domainName = netscapeThree()
}
else if ((explorerTest == "0") && (netscapeTest >= "4")) {
	domainName = netscapeFour()
}
else {domainName = GetNetComment()}
document.write('<H1><center>Вы \"' + domainName + '\" ?!</center></H1>')
}
//-->
</SCRIPT>
<BODY onLoad='getIP()'>



.

© Copyright 2008-2016 by KDG