ASP如果获取访客时区和操作系统语言?

来源:百度知道 编辑:UC知道 时间:2024/05/07 06:33:44
如题,能实现吗?
所在的时区用ASP怎么读取?如果用JS读了,那怎么用根据数值用IF语句来判断?
<SCRIPT LANGUAGE="JavaScript">
<!--
var dt=new Date();
alert(dt.toTimeString());
//-->
</SCRIPT>
比如:当时区=8时,显示“你的位置是中国吗?”

JS 获得了时区

<SCRIPT LANGUAGE="JavaScript">
<!--
var dt=new Date();
alert(dt.toTimeString());
//-->
</SCRIPT>

asp获得了系统
function operationsystem() '操作系统版本
agent = Request.ServerVariables("HTTP_USER_AGENT")
if Instr(agent,"NT 5.1")>0 then
SystemVer="Windows XP"
elseif Instr(agent,"NT 5")>0 then
SystemVer="Windows 2000"
elseif Instr(agent,"NT 4")>0 then
SystemVer="Windows NT4"
elseif Instr(agent,"4.9")>0 then
SystemVer="Windows ME"
elseif Instr(agent,"98")>0 then
SystemVer="Windows 98"
elseif Instr(agent,"95")>0 then
SystemVer="Windows 95"
else
SystemVer="未知"
end if
operationsystem="操作系统: " & SystemVer
end function