⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 6.htm

📁 IIS5.0超级管理手册-网页开发篇 书籍语言: 简体中文 书籍类型: 网页设计 授权方式: 免费软件 书籍大小: 262 KB
💻 HTM
📖 第 1 页 / 共 5 页
字号:
 </b></font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">Set BrowserType = Server.CreateObject (&quot;MSWC.BrowserType&quot;)</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">参数<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;BrowserType&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">指定由<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;Server.CreateObject&nbsp;</b></font>建立的<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;BrowserType&nbsp;</b></font>物件的名称。</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">范例<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  下面的范例使用BrowserType物件将目前浏览器的效能列为一张表,并显示出来:</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">&lt;% Set bc = Server.CreateObject (&quot;MSWC.BrowserType&quot;) %&gt;
&lt; TABLE BORDER=1 &gt;
&lt; TR &gt;&lt; TD &gt; Browser &lt;/ TD &gt;&lt; TD &gt;&lt;%= bc.browser %&gt;
&lt; TR &gt;&lt; TD &gt; Version &lt;/ TD &gt;&lt; TD &gt;&lt;%= bc.version %&gt;&lt;/ TD &gt;&lt;/ TR &gt;
&lt; TR &gt;&lt; TD &gt; Frames &lt;/ TD &gt;&lt; TD &gt;
&lt;% if (bc.frames = TRUE ) then %&gt; TRUE
&lt;% else %&gt; FALSE
&lt;% end if %&gt; &lt;/ TD &gt;&lt;/ TR &gt;
&lt; TR &gt;&lt; TD &gt; Tables &lt;/ TD &gt;&lt; TD &gt;
&lt;% if (bc.tables = TRUE ) then %&gt; TRUE
&lt;% else %&gt; FALSE
&lt;% end if %&gt;&lt;/ TD &gt;&lt;/ TR &gt;
&lt; TR &gt;&lt; TD &gt; BackgroundSounds &lt;/ TD &gt;&lt; TD &gt;
&lt;% if (bc. BackgroundSounds = TRUE ) then %&gt; TRUE
&lt;% else %&gt; FALSE
&lt;% end if %&gt; &lt;/ TD &gt;&lt;/ TR &gt;
&lt; TR &gt;&lt; TD &gt; VBScript &lt;/ TD &gt;&lt; TD &gt;
&lt;% if (bc.vbscript = TRUE ) then %&gt; TRUE
&lt;% else %&gt; FALSE
&lt;% end if %&gt; &lt;/ TD &gt;&lt;/ TR &gt;
&lt; TR &gt;&lt; TD &gt; JScript &lt;/ TD &gt;&lt; TD &gt;
&lt;% if (bc.javascript = TRUE ) then %&gt; TRUE
&lt;% else %&gt; FALSE
&lt;% end if %&gt; &lt;/ TD &gt;&lt;/ TR &gt;
&lt;/ TABLE &gt;</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e72d7" size="4" style="line-height: 25px">
  <b style="line-height: 25px">Browscap.ini档案<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">您可以在Browscap.ini档案中为任何数目的浏览器宣告属性定义,也可以设定用户端浏览器在清单中没有定义时应该使用的预设值。对於每一个浏览器定义,您都必须提供一个HTTP 
  User Agent标题以及希望与其关联的属性和值。有关HTTP User Agent标题格式的更多资讯,请参阅&nbsp;</font></a><font face="arial" color="#000000" size="2" style="line-height: 25px"><a target="_new" href="http://www.w3.org" style="line-height: 25px">http://www.w3.org</a>&nbsp;之World 
  Wide Web Consortium上的HTTP说明。</font></p>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">语法<br style="line-height: 25px">
 </b></font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">[; comments] 
[HTTPUserAgentHeader]
[parent = browser Definition]
[property1 = value1]
...
[property N = valueN]
[Default Browser Capability Settings]
[default Property1 = defaultValue1]
...
[default PropertyN = defaultValueN]</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">参数<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;comments&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  任何以一个分号(;)开始的行。被BrowserType物件忽略掉的注解可以出现在Browscap.ini档案中任何地方。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;HTTPUserAgentHeader&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">指定 
  HTTP User Agent标题,以使它和<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;property 
  N&nbsp;</b></font>中指定的浏览器属性相关联。Browscap.ini档案可以包含多个浏览器定义,每个都以一个唯一的HTTPUserAgentHeade值开始。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  您可以使用星号(*)来替代零个或多个字元;用(?)来替代单个字元。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  例如,如果为HTTPUserAgentHeade指定了下面的字串:</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">[Mozilla/4.0 (compatible; MSIE 5.0;* Windows NT )]</pre>
    </font>
  </div>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  那麽它会将以下所有的User Agent标题对应起来:</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">[Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)]
[Mozilla/4.0 (compatible; MSIE 5.0; AK; Windows NT)]
[Mozilla/4.0 (compatible; MSIE 5.0; SK; Windows NT)]</pre>
    </font>
  </div>
  <hr style="line-height: 25px">
  <p>
  <font face="Arial" color="#3e77d7" size="3" Black style="line-height: 25px">
  <b style="line-height: 25px">说明</b></font> </p>
  <p><font face="arial" color="black" size="2" style="line-height: 25px"></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;BrowserType&nbsp;</b></font>物件首先尝试寻找一个和HTTPUserAgent 
  Header值完全一致的相同项目。如果不成功,它才会使用符号来寻找相同项目。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  如果使用符号後,有不止一个浏览器定义和User Agent标题符合,那麽<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;BrowserType&nbsp;</b></font>物件会传回一个和User 
  Agent标题最接近的相同项目。最接近的相同项目是指替代字元数最少的项目。</font></p>
  </font>
  <p> </p>
  <hr style="line-height: 25px">
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;browser Definition&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  一个选择性的参数,它定义是否使用某个浏览器的HTTP User 
  Agent标题作为父浏览器。目前的浏览器定义将会继承父浏览器的所有属性。这有助於为一个新版本的浏览器定义属性,因为新版本通常会保留先前版本的大多数属性。您可以透过为属性明确设定新值来改写这些继承属性的值,其语法为property 
  N=valueN。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;property N&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  一个选择性的参数,它指定要设定之浏览器的属性名称。此参数必须以英文字母开头,长度不能超过255个字元。Browscap.ini档案中的每一个浏览器定义可以包含足够的属性宣告。例如,如果应用程式只需知道使用者浏览器是否支援VBScript,那麽只要为每个浏览器定义增加一个属性即可。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  下表列出了一些可能的属性:</font></p>
  <center style="line-height: 25px">
  <table border="1" style="line-height: 25px">
    <tbody style="line-height: 25px">
      <tr style="line-height: 25px">
        <th style="line-height: 25px"><font size="2" style="line-height: 25px">
        属性</font> </th>
        <th style="line-height: 25px"><font size="2" style="line-height: 25px">
        说明</font></th>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        ActiveXControls</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援ActiveX控制项。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Backgroundsounds</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援背景声音。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Beta</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否是测试软体。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Browser</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器的名称。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Cdf</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援Webcasting的Channel Definition Format。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Cookies</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援cookies。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Frames</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援框架。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Javaapplets</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援Java applet。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Javascript</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援JScript。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Platform</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器的执行平台。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Tables</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援表格。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Vbscript</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器是否支援VBScript。</font></td>
      </tr>
      <tr style="line-height: 25px">
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        Version</font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定浏览器的版本编号。</font></td>
      </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -