学院首页>网页制作>心得技巧>显示访问者的操作系统

显示访问者的操作系统

作者:未知 来源:未知 添加时间:2006-5-21 10:10:57
您的操作系统是: Windows 95/98
请在<body>和</body>加入下面的的代码

<SCRIPT>
agent = navigator.userAgent;
if (agent.lastIndexOf("Win95"))
{
document.write(' Windows 95/98');
}
else if (agent.lastIndexOf("Win16"))
{
document.write(' Windows 3.2');
}
else if (agent.lastIndexOf("Mac"))
{
document.write(' Macintosh');
}
else if (agent.lastIndexOf("Unix"))
{
document.write(' Unix');
}
else if (agent.lastIndexOf("Linux"))
{
document.write(' Linux');
}
</script>
站内搜索