📄 6.htm
字号:
下面的例子示范一个了没有边框的广告:</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 ad = Server.CreateObject ("MSWC.AdRotator")
ad.Border = 0
%>
<%= ad.GetAdvertisement ("/ads/adrot.txt") %></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="#000000" size="2" style="line-height: 25px">
<font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
<b style="line-height: 25px"> Clickable、TargetFrame </b></font>。</font></p>
<p><font face="arial" color="#3e74d7" size="3" style="line-height: 25px">
<b style="line-height: 25px">Clickable<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"> Clickable </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">Clickable = value</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"> value </b></font></p>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">
指定一个广告是否是超连结。该参数可设为下列值。预设值为TRUE。</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">
TRUE</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">
FALSE</font></td>
<td style="line-height: 25px"><font size="2" style="line-height: 25px">
不以超连结形式来显示广告。</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"><%
Set ad = Server.CreateObject ("MSWC.AdRotator")
ad.Clickable = FALSE
%>
<%= ad.GetAdvertisement ("/ads/adrot.txt") %></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="#000000" size="2" style="line-height: 25px">
<font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
<b style="line-height: 25px"> Border、TargetFrame </b></font>。</font></p>
<p><font face="arial" color="#3e74d7" size="3" style="line-height: 25px">
<b style="line-height: 25px">TargetFrame<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"> TargetFrame </b></font>属性指定了要载入连结的目标框架。这个属性和HTML固定语法(anchor
statement)中的TARGET参数执行的功能一样。</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">TargetFrame = frame</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"> frame </b></font></p>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">
指定要在其中显示广告的目标框架的名称。该参数也可作为HTML的框架关键字之一,例如 _ TOP、_ NEW、_ CHILD、_ SELF、_ PARENT
或 _ BLANK。预设值是NO FRAME。</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">
下例在一个名为AdFrame的框架中显示广告:</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 ad = Server.CreateObject ("MSWC.AdRotator")
ad.TargetFrame = AdFrame
%>
<%= ad.GetAdvertisement ("/ads/adrot.txt") %></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="#000000" size="2" style="line-height: 25px">
<font face="arial" color="#3e80d7" size="2" style="line-height: 25px">
<b style="line-height: 25px"> Border、Clickble </b></font>。</font></p>
<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>
<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"> AdRotator </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"> GetAdvertisement </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="#3e74d7" size="3" style="line-height: 25px">
<b style="line-height: 25px">GetAdvertisement<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"> GetAdvertisement </b></font>方法从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>
<div style="line-height: 25px; background-color: #d7d7d7">
<font face="Arial" size="3" style="line-height: 25px">
<pre style="line-height: 25px">GetAdvertisement (rotation SchedulePath)</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"> rotation SchedulePath </b></font></p>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">指定
Rotator Schedule档案相对虚拟目录的位置。例如,如果实体路径为C:InetpubWwwrootAdsAdrot.txt(这里Wwwroot是「/」虚拟目录),那麽就可以将路径指定为Adrot.Txt。</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">
传回在目前网页中显示广告的HTML。</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">
下面的范例会从 / Ads/virtual目录下的Adrot.txt档案中取得一个广告。</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 NextAd = Server.CreateObject ("MSWC.AdRotator") %>
<%= NextAd.GetAdvertisement ("/ads/adrot.txt") %></pre>
</font>
</div>
</a><a name="206002" style="line-height: 25px">
<p><font face="arial" color="#3e70d7" size="5" style="line-height: 25px">
<b style="line-height: 25px">Browser Capabilities元件<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"> Browser Capabilities </b></font>元件会建立一个BrowserType物件,该物件向指令档提供用户端之浏览器的效能说明。当一个浏览器连向Web伺服器时,它会自动传送一个HTTP
User Agent标题。这个标题是一个记录浏览器及其版本编号的ASCII字串。BrowserType物件会把该标题和Browscap.ini档案中的项目相比较,如果找到一个相同项目,BrowserType物件就认为该浏览器清单的属性和User
Agent标题是一致的。</font></p>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">
如果该物件在Browscap.ini档案中没有找到相同项目,那麽它就会使用「*」和「?」来寻找最接近的相同项目。如果使用了上述符号还不能找到相同项目,同时在Browscap.ini档案中又定义了预设值的话,该物件就会使用浏览器的预设设定。如果该物件没能找到相同项目并且在Browscap.ini档案中网页没有浏览器的预设设定,它就会把所有属性设为字串「UNKNOWN」。</font></p>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">透过更新Browscap.ini档案,就可以简单地替这个元件增加新的属性或者新的浏览器定义。</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>
<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 size="2" style="line-height: 25px">
Browscap.dll</font></td>
<td style="line-height: 25px"><font size="2" style="line-height: 25px">
Brower Capabilities元件。</font></td>
</tr>
</table>
</center>
<p><font face="arial" color="#000000" size="2" style="line-height: 25px">
Browscap.ini 一个把浏览器效能对应到HTTP User Agent标题的文字档。这个档案必须和Browscap.dll在同一目录下。</font></p>
<p><font face="arial" color="#3e76d7" size="2" style="line-height: 25px">
<b style="line-height: 25px">语法<br style="line-height: 25px">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -