HTML-Code
<html>
<head>
<title>Browser
Erkennung</title>
</head>
<body>
<SCRIPT
Language="JavaScript">
document.write('<align="center"><font face="Verdana" size="2"><b>');
document.write('Sie benutzen ');
if (navigator.userAgent.indexOf("Opera") != -1)
{
refer = "opera.html";
document.write('Opera');
}
else if (navigator.userAgent.indexOf("Netscape") != -1)
{
refer = "netscapelink.html";
document.write('Netscape Navigator');
}
else if (navigator.appName.indexOf("Internet Explorer") !=
-1)
{
refer = "msielink.html";
document.write('Internet Explorer');
}
else if (navigator.userAgent.indexOf("Firefox") != -1)
{
refer = "firefox.html";
document.write('Mozilla Firefox');
}
else
{
refer = "unbekannt.html";
document.write('Unbekannter Browser');
}
//an dieser Stelle könnte entsprechend umgeleitet werden:
//window.location = refer
</script>
</body>
</html>
|