Javascript用户代理OS检测问题 - xp64与win2003相同! Vista与win2008相同! [英] Javascript user agent OS detection problem - xp64 bit same as win2003! Vista same as win2008!

查看:74
本文介绍了Javascript用户代理OS检测问题 - xp64与win2003相同! Vista与win2008相同!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我有以下Javascript部分,一个应该检测Vista,另一个检测XP ...

如果(导航器。 userAgent.toLowerCase()。indexOf(" windows nt 6.0")> 1){
- 用于Vista的东西}}

如果(navigator.userAgent。 toLowerCase()。indexOf(" windows nt 5.1")> 1){
- 用于XP的东西}

问题是根据这篇文章 - http://msdn.microsoft.com/en-us/library/ms537503.aspx ,xp 64bit的平台参数与win 2003相同,Vista one与win 2008相同。

那么如何创建区分xp 64bit和win 2003的代码呢?和win2008的Vista?

谢谢!

克里斯

Hi all!

I have the following sections of Javascript, one which is supposed to detect Vista and the other which detects XP...

 if(navigator.userAgent.toLowerCase().indexOf("windows nt 6.0") > 1){
--Do stuff for Vista
}

 if(navigator.userAgent.toLowerCase().indexOf("windows nt 5.1") > 1){
--Do stuff for XP
}

The problem is that according to this article - http://msdn.microsoft.com/en-us/library/ms537503.aspx, the platform parameter for xp 64bit is the same as win 2003, and the Vista one is the same as win 2008.

So how can I create code which will distinguish xp 64bit from win 2003?  and Vista from win2008?

Thanks!

Chris

推荐答案

没有答案,但我是好奇:为什么你需要知道?
No answer for you, but I'm curious:  Why do you need to know?


这篇关于Javascript用户代理OS检测问题 - xp64与win2003相同! Vista与win2008相同!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆