高分求如何判断浏览器是32位还是64位 如题, 我尝试用navigator.platform试过,在英文版操作系统中,32位的IE返回Win32,64位的IE返回Win64。 但是在日文版的系统中都返回Win32不知道还有其他好的方法没? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 好像还有个navigator.appversion吧,结合起来看看怎么样64位的系统返回win32那应该算是它们浏览器的bug appversion看不出来, 倒是cupClass可以看出来但是Microsft IE 可以检查到,firefox的浏览器有检测不出来 我发现adobe的网站有这个功能www.adobe.com/go/getflash这个网址在32和64位ie分别打开的时候, 会被重定向到两个不同的网页上去但是没办法看到它的脚本 看结合UA,来试一下,我发过去的http 请求header如下:User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1Windows NT 5.1; 看起来很明显 应该是UA来判断,navigator.platform是在js里作的,太慢了,访问的时候没JS解析的时候它就redirect了的 我测试了下cpuClass, 32IE返回x86,64IE返回x64但是firefox就没有返回了User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1Windows NT 5.1是运行的操作系统吧?64位的系统上可以有32和64位的view 你的意思是User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1被发送到www.adobe.com/go/getflash 这里解析的吗? 基本就只有这些了吧:<script type="text/javascript">var x = navigator;document.write("CodeName=" + x.appCodeName);document.write("<br />");document.write("MinorVersion=" + x.appMinorVersion);document.write("<br />");document.write("Name=" + x.appName);document.write("<br />");document.write("Version=" + x.appVersion);document.write("<br />");document.write("CookieEnabled=" + x.cookieEnabled);document.write("<br />");document.write("CPUClass=" + x.cpuClass);document.write("<br />");document.write("OnLine=" + x.onLine);document.write("<br />");document.write("Platform=" + x.platform);document.write("<br />");document.write("UA=" + x.userAgent);document.write("<br />");document.write("BrowserLanguage=" + x.browserLanguage);document.write("<br />");document.write("SystemLanguage=" + x.systemLanguage);document.write("<br />");document.write("UserLanguage=" + x.userLanguage);</script>不知道你要来做什么 navigator.appName = Microsoft Internet Explorer(瀏覽器名稱)navigator.appVersion = 4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)(瀏覽器主要版本)navigator.appminorVersion = ;SP3;(瀏覽器次要版本)navigator.appCodeName = Mozilla(瀏覽器代碼)navigator.cpuClass = x86(CPU 類別)navigator.platform = Win32(作業系統平台)navigator.systemLanguage = zh-cn(瀏覽器預設語言)navigator.userLanguage = zh-cn(使用者預設語言)navigator.cookieEnabled = true(是否允許使用小餅乾) 是这样的,adobe没有提供64位的flash player,所以flash在64位的浏览器上是打不开的我就想检测浏览器的版本信息,如果是64位浏览器的话我就提示用户是什么原因现在浏览器的版本太多,我不知道有没有什么通用的方法能检测到浏览器是不是64位的。chinmo的方法我都测试过,测试表明可以用navigator.cupClass来测试microsoft internet explorer(32Ie 返回x86, 64IE 返回x64)但是这个方法对火狐之类的浏览器不起作用。我发现www.adobe.com/go/getflash这个网页就检测了ie版本类型,然后相应的跳到不同的页面,但是我无法看到它的脚本 UA是在http header里面发的,优先级最高你抓个64位浏览器的http header来看一下,看能不能区分出来 你想根据多少位来调用FLASH播放器? -------------------------------------------------------64位-------------------------------------------------------CodeName=MozillaMinorVersion=0Name=Microsoft Internet ExplorerVersion=4.0 (compatible; MSIE 7.0; Windows NT 5.2; Win64; x64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)CookieEnabled=trueCPUClass=x64OnLine=truePlatform=Win64UA=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Win64; x64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)BrowserLanguage=en-usSystemLanguage=en-usUserLanguage=en-us -------------------------------------------------------32位-------------------------------------------------------CodeName=MozillaMinorVersion=0Name=Microsoft Internet ExplorerVersion=4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)CookieEnabled=trueCPUClass=x86OnLine=truePlatform=Win32UA=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)BrowserLanguage=en-usSystemLanguage=en-usUserLanguage=en-us flash播放器是用adobe提供的脚本AC_RunActiveContent.js来下载的,你说的多少位是指? 这是火狐上得到的,32位的系统上CodeName=MozillaMinorVersion=undefinedName=NetscapeVersion=5.0 (Windows; en-US)CookieEnabled=trueCPUClass=undefinedOnLine=truePlatform=Win32UA=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)BrowserLanguage=undefinedSystemLanguage=undefinedUserLanguage=undefined 我没找初什么规律来 根据是否含有Win64,x64关键字?UA包含的内容怎么解读? 是啊,另一个显示的是“WOW64”浏览器发过去你收着http header就可以解析了我没做过这方面的,应该跟处理cookie差不多吧 UA利用这个,使用indexof来查找是否存在Win64或者Win64 http://www.sevenforums.com/browsers-mail/79180-differences-between-ie-32-bit-64-bit.html如果ie的about面板,没有显示64 bit,那么说明你的ie是32位的。 ie工具后面的 "? "下拉菜单 点关于internet explorer (A) 就看出来了看版本是 64-bit的就是64位的 ,如没有的就是32位的浏览器了 浏览器关闭,让session销毁 求一个正则表达式 我想做一个页面载入后播放一次马赛克的效果 背景自适应自动变换背景效果遇到难题。请教一下!!急!! 有关JavaScript的问题 JQuery,怎么用“Name”属性获取对象? 如何实现鼠标移上变成选择文本? 发布一棵可以绑定XML文件的树,欢迎讨论测试。 怎么会出现这种错误 为什么window.location.href都能访问到"http://.../?aa=1&bb=1" ,但是post却访问不到呢? 如何写这个xpath javascript 控件
64位的系统返回win32那应该算是它们浏览器的bug
www.adobe.com/go/getflash这个网址在32和64位ie分别打开的时候, 会被重定向到两个不同的网页上去但是没办法看到它的脚本
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1
Windows NT 5.1; 看起来很明显
但是firefox就没有返回了User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1Windows NT 5.1是运行的操作系统吧?
64位的系统上可以有32和64位的view
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.4, Ant.com Toolbar 1.1
被发送到www.adobe.com/go/getflash 这里解析的吗?
var x = navigator;
document.write("CodeName=" + x.appCodeName);
document.write("<br />");
document.write("MinorVersion=" + x.appMinorVersion);
document.write("<br />");
document.write("Name=" + x.appName);
document.write("<br />");
document.write("Version=" + x.appVersion);
document.write("<br />");
document.write("CookieEnabled=" + x.cookieEnabled);
document.write("<br />");
document.write("CPUClass=" + x.cpuClass);
document.write("<br />");
document.write("OnLine=" + x.onLine);
document.write("<br />");
document.write("Platform=" + x.platform);
document.write("<br />");
document.write("UA=" + x.userAgent);
document.write("<br />");
document.write("BrowserLanguage=" + x.browserLanguage);
document.write("<br />");
document.write("SystemLanguage=" + x.systemLanguage);
document.write("<br />");
document.write("UserLanguage=" + x.userLanguage);
</script>
不知道你要来做什么
navigator.appVersion = 4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)(瀏覽器主要版本)
navigator.appminorVersion = ;SP3;(瀏覽器次要版本)
navigator.appCodeName = Mozilla(瀏覽器代碼)
navigator.cpuClass = x86(CPU 類別)
navigator.platform = Win32(作業系統平台)
navigator.systemLanguage = zh-cn(瀏覽器預設語言)
navigator.userLanguage = zh-cn(使用者預設語言)
navigator.cookieEnabled = true(是否允許使用小餅乾)
但是这个方法对火狐之类的浏览器不起作用。我发现www.adobe.com/go/getflash这个网页就检测了ie版本类型,然后相应的跳到不同的页面,但是我无法看到它的脚本
-------------------------------------------------------64位-------------------------------------------------------
CodeName=Mozilla
MinorVersion=0
Name=Microsoft Internet Explorer
Version=4.0 (compatible; MSIE 7.0; Windows NT 5.2; Win64; x64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
CookieEnabled=true
CPUClass=x64
OnLine=true
Platform=Win64
UA=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; Win64; x64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
BrowserLanguage=en-us
SystemLanguage=en-us
UserLanguage=en-us
-------------------------------------------------------32位-------------------------------------------------------
CodeName=Mozilla
MinorVersion=0
Name=Microsoft Internet Explorer
Version=4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
CookieEnabled=true
CPUClass=x86
OnLine=true
Platform=Win32
UA=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
BrowserLanguage=en-us
SystemLanguage=en-us
UserLanguage=en-us
MinorVersion=undefined
Name=Netscape
Version=5.0 (Windows; en-US)
CookieEnabled=true
CPUClass=undefined
OnLine=true
Platform=Win32
UA=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
BrowserLanguage=undefined
SystemLanguage=undefined
UserLanguage=undefined
我没找初什么规律来
看版本是 64-bit的就是64位的 ,如没有的就是32位的浏览器了