Control Study -> 检索浏览器性能

(一).说明

      检索浏览器性能,判断浏览器是否哪些功能,例如检测是否支持: 背景音乐/ActiveXControls/JavaScript脚本

      以及 输出浏览器当前版本信息等

(二).讲解

    1. 代码

<form id="Form1" method="post" runat="server">
         检索浏览器性能 
         Boolean ActiveXControls = <%=Request.Browser.ActiveXControls.ToString()%><br>
         Boolean BackgroundSounds = <%=Request.Browser.BackgroundSounds.ToString()%><br>
         Boolean Beta = <%=Request.Browser.Beta.ToString()%><br>
         String Browser = <%=Request.Browser.Browser%><br>
         Boolean VBScript = <%=Request.Browser.VBScript.ToString()%><br>
         String Version = <%=Request.Browser.Version%><br>
         Boolean Win16 = <%=Request.Browser.Win16.ToString()%><br>
         Boolean Win32 = <%=Request.Browser.Win32.ToString()%><br>
         Boolean JavaApplets = <%=Request.Browser.JavaApplets.ToString()%><br>
         Boolean JavaScript = <%=Request.Browser.JavaScript.ToString()%><br>
</form>

 

2.运行结果显示

检索浏览器性能

Boolean ActiveXControls = True
Boolean BackgroundSounds = True
Boolean Beta = False
String Browser = IE
Boolean VBScript = True
String Version = 6.0
Boolean Win16 = False
Boolean Win32 = True
Boolean JavaApplets = True
Boolean JavaScript = True

(三).代码示例下载

        http://www.cnitblog.com/Files/ChengKing/configSample.rar


阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页