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

📄 6.htm

📁 IIS5.0超级管理手册-网页开发篇 书籍语言: 简体中文 书籍类型: 网页设计 授权方式: 免费软件 书籍大小: 262 KB
💻 HTM
📖 第 1 页 / 共 5 页
字号:
  <b style="line-height: 25px">方法<br style="line-height: 25px">
 </b></font></p>
  <center style="line-height: 25px">
  <table border="1" style="line-height: 25px">
    <tbody style="line-height: 25px">
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;GetAdvertisement&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        从资料档案中获取下一个广告的规格并将其转变为HTML格式。</font></td>
      </tr>
  </table>
  </center>
  <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">
  下例示范了每当使用者开启该网页时,就会显示一个不同的广告。</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 ad = Server.CreateObject (&quot;MSWC.AdRotator&quot;) %&gt;
&lt;%= ad. GetAdvertisement (&quot;/ads/adrot.txt&quot;) %&gt;</pre>
    </font>
  </div>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  下面的HTML是由<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;GetAdvertisement&nbsp;</b></font>方法产生的,并被加入到网页的输出中,它显示了Rotator 
  Schedule档案中的下一个广告:</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;A HREF=&quot;http://www.msn.com/isapi/adredir.asp? URL=http://www.company.com/&quot;&gt;

&lt; IMG SRC=&quot;http://msnnt3web/ads/homepage/chlogolg.gif&quot;
ALT=&quot;Check out the new Technology Center”
WIDTH=440 HEIGHT=60 BORDER=1 &gt;&lt;/ A &gt;</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e72d7" size="4" style="line-height: 25px">
  <b style="line-height: 25px">Rotator Schedule档案<br style="line-height: 25px">
 </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;Rotator Schedule&nbsp;</b></font>档案包含了Ad 
  Rotator元件用以管理和显示不同广告图案的资讯。您可以在其中指定广告的细部资讯,例如广告空间的尺寸大小、所使用的图案档案,以及每个档案显示时间的百分比。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  Rotator 
  Schedule档案有两部分。第一部分设定用於转换排程中所有广告图案的参数。第二部分则指定每个广告的档案及其所在位置以及各自的显示时间百分比。这两部分用一个包含星号(*)的行隔开。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  在第一部分中只有四个全域参数,每个参数都由一个关键字及值组成。这些参数都是选择性的。如果没有指定全域参数的值,那麽Ad 
  Rotator元件会使用预设值。在这种情况下,档案的第一行只能包含一个星号(*)。</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">REDIRECT  URL]
WIDTH  numWidth]
HEIGHT  numHeight]
BORDER  numBorder]
*
ad URL
ad HomePageURL
Text
impressions</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;URL&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  指定动态连结库(.dll)或实作重新定向之应用档案(.asp)的路径。该路径可以指定为完整路径(http:// MyServer/MyDir/redirect.asp),也可为到虚拟目录的相对路径(/ 
  MyDir/redirect.asp)。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;num Width&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  指定广告页的宽度,以像素为单位。预设值为440个像素。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;num Height&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  指定广告页的高度,以像素为单位。预设值为60个像素。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;num Border&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  指定广告四周超连结边框的宽度,以像素为单位,预设值为1。如果设为0则表示没有边框。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;ad URL&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  广告图像档的位置。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;ad HomePageURL&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  登广告者的主网页位置。如果登广告者没有主网页,那麽便在这一行上放置一个连字号(-),以表示该广告没有连结。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;Text&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  在浏览器不支援图形或者浏览器的图形功能已关掉时显示的替代文字。</font></p>
  <p><font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
  <b style="line-height: 25px">&nbsp;impressions&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  一个0到10000间的数字,它表示广告的出现比例。例如,如果一个Rotator Schedule档案中有叁个档案,它们的<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;impressions&nbsp;</b></font>值设为2、3和5,那麽第一个广告显示的时间占总时间的比例为20%,第二个为30%,第叁个为50%。</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">
  如果所有项目的impressions参数值的总和超过了10000,那麽在Rotator Schedule档案首次因使用<font face="arial" color="#3e80d7" size="2" style="line-height: 25px"><b style="line-height: 25px">&nbsp;GetAdvertisement&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">
  下面的指令档程式示范了如何使用一个Rotator Schedule档案来显示一组不同的广告以及如何包含一个Redirection档案:</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">--Adrot.txt--
REDIRECT /scripts/adredir.asp
WIDTH 440
HEIGHT 60
BORDER 1
*
http://kabaweb/ads/homepage/chlogolg.gif
http://www.bytecomp.com/
Check out the ByteComp Technology Center
20
http://kabaweb/ads/homepage/gamichlg.gif
-
Sponsored by Flyteworks
20
http://kabaweb/ads/homepage/ismodemlg.gif
http:// www.proelectron.com/
28.8 internal PC modem, only $99
80
http://kabaweb/ads/homepage/spranklg.gif
http://www.clocktower.com/
The #1 Sports site on the net
10</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e72d7" size="4" style="line-height: 25px">
  <b style="line-height: 25px">Redirection档案<br style="line-height: 25px">
 </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;Redirection&nbsp;</b></font>档案是由您自己建立的。它通常包括一个指令档,该指令档解析由AdRotator物件传送过来的查询字串,并把使用者重新定向到和他按下的广告相关联的URL。</font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  您还可以在Redirection档案中包含能统计某特定广告被使用者按下次数之指令档,并把该资讯存放在伺服器的某个档案内。</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">
  下面的范例会把使用者重新定向到广告商的主网页上。</font></p>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">--Adredir.asp---
&lt;% Response.Redirect (Request.QueryString (&quot;url&quot;)) %&gt;</pre>
    </font>
  </div>
  <p><font face="arial" color="#3e72d7" size="4" style="line-height: 25px">
  <b style="line-height: 25px">Ad Rotator 属性<br style="line-height: 25px">
 </b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">Ad 
  Rotator物件有以下属性:</font></p>
  <center style="line-height: 25px">
  <table border="1" style="line-height: 25px">
    <tbody style="line-height: 25px">
      <tr style="line-height: 25px">
        <td style="line-height: 25px">
        <font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Border&nbsp;</b></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 face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;Clickable&nbsp;</b></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 face="arial" color="#3e80d7" size="2" style="line-height: 25px">
        <b style="line-height: 25px">&nbsp;TargetFrame&nbsp;</b></font></td>
        <td style="line-height: 25px"><font size="2" style="line-height: 25px">
        指定显示该广告的框架名称。</font></td>
      </tr>
  </table>
  </center>
  <p><font face="arial" color="#3e74d7" size="3" style="line-height: 25px">
  <b style="line-height: 25px">Border<br style="line-height: 25px">
 </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;Border&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>
  <div style="line-height: 25px; background-color: #d7d7d7">
    <font face="Arial" size="3" style="line-height: 25px">
    <pre style="line-height: 25px">Border =size</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;size&nbsp;</b></font></p>
  <p><font face="arial" color="#000000" size="2" style="line-height: 25px">
  指定所要显示广告的边框厚度。预设值就是在Rotator Schedule档案标题中设定的值。</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">

⌨️ 快捷键说明

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