本文介绍了IE7出来后检测浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想确保一旦IE7 发布,我将进行浏览器检测。我当前的检测语句(使用VB.NET编写)是: 如果Me.Request.Browser.Browser.ToUpper()=" IE"然后 ''用于Internet Explorer浏览器的代码 否则 ''用于Internet Explorer以外的浏览器的代码 结束如果 我需要以什么方式修改它以使其适用于IE7? 谢谢。 - Nathan Sokalski nj ******** @ hotmail。 com http://www.nathansokalski.com/ 解决方案 该测试版是免费提供的,可以帮助您发现其他区域 ,您需要更新/修改您的IE7网站。微软还为网络开发人员提供了各种资源来为IE7做准备,我认为你可以在微软网站上找到这些资源。 Damien 对Request.Browser类的五秒钟检查会显示 所有其他属性...... 我的IE7的Beta3副本(7.0.5450.4)将以下值(在 括号中)返回给Request.Browser对象: ..ActiveXControls(True) ..AOL(假) ..BackgroundSounds(True) ..Beta(False) ..浏览器(IE) ..CDF(假) ..ClVVersion(2.0.50727) ..Cookies(True) ..Crawler(False) ..EcmaScriptVersion(1.2) ..Frames(True) ..JavaApplets(真) ..JavaScript(真) ..MajorVersion(7) ..MinorVersion(0) ..MSDomVersion(7.0) ..平台(WinXP) ..Tables(True) ..Type(IE7) ..VBScript(True) ..版本(7.0) .. W3CDomVersion(1.0) ..Win16(假) ..Win32(真) 我对.Beta属性感到有些疑惑,我原本期望 返回True而不是False ... 对Request.Browser类的五秒钟检查会显示 所有其他属性...... 我的IE7的Beta3副本(7.0.5450.4)将以下值(在 括号中)返回给Request.Browser对象: .ActiveXControls(True) .AOL(假) .BackgroundSounds(True) .Beta(假) 。浏览器(IE) .CDF(假) .ClrVersion(2.0.50727) .Cookies(True) .Crawler(False) .EcmaScriptVersion(1.2) .Frames(True) .JavaApplets(真的) .JavaScript(真) .MajorVersion(7) .MinorVersion(0) 。 MSDomVersion(7.0) 。平台(WinXP) 。表(真) .Type(IE7) .VBScript(True) 。版本(7.0) .W3CDomVersion(1.0) .Win16(假) .Win32(真) 我是对.Beta属性感到有些疑惑,我原本期望 返回True而不是False ...... I want to make sure I am doing a browser detection that will work once IE7is released. My current detection statement (written using VB.NET) is:If Me.Request.Browser.Browser.ToUpper() = "IE" Then''Code to use for Internet Explorer browsersElse''Code to use for browsers other than Internet ExplorerEnd IfIn what ways would I need to modify this to make it work for IE7 as well?Thanks.--Nathan Sokalski nj********@hotmail.com http://www.nathansokalski.com/ 解决方案The Beta is freely available, and may help you discover other areaswhere you need to update/amend your site for IE7. Microsoft have alsogot various resources for web developers to prepare for IE7, which Ithink you can find on the microsoft web site.DamienA five-second inspection of the Request.Browser class would have revealedall its other properties...My Beta3 copy of IE7 (7.0.5450.4) returns the following values (inparentheses) to the Request.Browser object:..ActiveXControls (True)..AOL (False)..BackgroundSounds (True)..Beta (False)..Browser (IE)..CDF (False)..ClrVersion (2.0.50727)..Cookies (True)..Crawler (False)..EcmaScriptVersion (1.2)..Frames (True)..JavaApplets (True)..JavaScript (True)..MajorVersion (7)..MinorVersion (0)..MSDomVersion (7.0)..Platform (WinXP)..Tables (True)..Type (IE7)..VBScript (True)..Version (7.0)..W3CDomVersion (1.0)..Win16 (False)..Win32 (True)I''m slightly puzzled about the .Beta property, which I would have expectedto return True instead of False...A five-second inspection of the Request.Browser class would have revealedall its other properties...My Beta3 copy of IE7 (7.0.5450.4) returns the following values (inparentheses) to the Request.Browser object:.ActiveXControls (True).AOL (False).BackgroundSounds (True).Beta (False).Browser (IE).CDF (False).ClrVersion (2.0.50727).Cookies (True).Crawler (False).EcmaScriptVersion (1.2).Frames (True).JavaApplets (True).JavaScript (True).MajorVersion (7).MinorVersion (0).MSDomVersion (7.0).Platform (WinXP).Tables (True).Type (IE7).VBScript (True).Version (7.0).W3CDomVersion (1.0).Win16 (False).Win32 (True)I''m slightly puzzled about the .Beta property, which I would have expectedto return True instead of False... 这篇关于IE7出来后检测浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-14 20:51