快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

用ASP怎样编写文档搜索页面(2)

<td valign="top">DocSubject</td>
<td valign="top">文档的主题</td>
</tr>
<tr>
<td valign="top">DocAuthor</td>
<td valign="top">文档的作者</td>
</tr>
<tr>
<td valign="top">DocKeywords</td>
<td valign="top">文档中的要害字</td>
</tr>
<tr>
<td valign="top">DocComments</td>
<td valign="top">文档中的注释</td>
</tr>
</table>

<p>属性名的完整列表,请参阅本页后面的<a href="#PropertyNamesList">属性名列表</a> 。</p>

<h2><a name="RelationalOperators">关系运算符</a></h2>

<p>关系运算符用于关系属性查询中。</p>

<table border="1" cellpadding="4" cellspacing="1" width="100%">
<tr>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width=33%>搜索目标</th>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width=33%>示例</th>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width=33%>结果</th></tr>
<tr>
<td valign="top">与固定值相关的属性值</td>
<td valign="top">@size < 100 <br>
@size <= 100 <br>
@size = 100 <br>
@size != 100 <br>
@size >= 100 <br>
@size > 100 </code></td>
<td valign="top">大小与查询匹配的文件</td>
</tr>
<tr>
<td valign="top">拥有全部比特集的属性值</td>
<td valign="top"><code>@attrib ^a 0x820</code></td>
<td valign="top">拥有存档属性的压缩文件</td>
</tr>
<tr>
<td valign="top">拥有一些比特集的属性值</td>
<td valign="top"><code>@attrib ^s 0x20</code></td>
<td valign="top">拥有存档属性的文件</td>
</tr>
</table>

<h2><a name="PropertyValues">属性值</a></h2>

<table border="1" cellpadding="4" cellspacing="1" width="100%">
<tr>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width="130">搜索目标</th>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width="200">示例</th>
<th align="Left" valign="bottom" bgcolor="#C0C0C0" width="170">结果</th></tr>
<tr>
<td valign="top">指定值</td>
<td valign="top"><code>@DocAuthor = Bill Barnes </code></td>
<td valign="top">由“Bill Barnes”创作的文件</td>
</tr>
<tr>
<td valign="top">以前缀开始的值</td>
<td valign="top"><code>#DocAuthor George* </code></td>
<td valign="top">作者名字是以“George”打头的文件</td>
</tr>
<tr>
<td valign="top">带扩展名集中任何一种扩展名的文件</td>
<td valign="top"><code>#filename *.|(exe|,dll|,sys|) </code></td>
<td valign="top">带 .exe、.dll 或 .sys 扩展名的文件</td>
</tr>
<tr>
<td valign="top">在某个日期之后修改过的文件</td>
<td valign="top"><code>@write > 96/2/14 10:00:00</code></td>
<td valign="top">在 1996 年 2 月 14 日 10:00 GMT 之后修改过的文件
</td>
</tr>
<tr>
<td valign="top">在相对日期之后修改过的文件</td>
<td valign="top"><code>@write > -1d2h</code></td>
<td valign="top">在最近 26 小时之内修改过的文件</td>
</tr>
<tr>
<td valign="top">匹配一个矢量的矢量</td>
<td valign="top"><code>@vectorprop = { 10, 15, 20 }</code></td>
<td valign="top">矢量值为 { 10, 15, 20 } 的 ActiveX 文档</td>
</tr>
<tr>
<td valign="top">每一个值都与标准匹配的矢量</td>
<td valign="top"><code>@vectorprop >^a 15</code></td>
<td valign="top">矢量值的每一个值都大于 15 的 ActiveX 文档</td>
</tr>
<tr>
<td valign="top">至少有一个值与标准匹配的矢量</td>
<td valign="top"><code>@vectorprop =^s 15</code></td>
<td valign="top">矢量值中至少有一个值大于 15 的 ActiveX 文档</td>
</tr>
</table>

<p> </p>

<ul>
<li>当使用正则表达式查询时,请确保在属性值之前带上 (#) 字符,否则请带上“at”(@) 字符。等于 (=) 关系运算符假定为用于正则表达式查询。</li>
<li>文件名 (#filename) 是唯一支持在文字左边出现通配符的正则表达式的属性。</li>
<li>日期和时间值为 <em>yyyy/mm/dd hh:mm:ss</em> 或 <EM>yyyy-mm-dd hh:mm:ss</EM> 格式。年的前两位和整个时间都可以忽略。假如忽略年的前两位,那么小于等于 29 的数字将解释为二十一世纪,大于或等于 30 的数字将解释为二十世纪。所有日期和时间都是格林尼治时间 (GMT)。</li>
<li>相对与当前时间的日期和时间可以用减号 (-) 跟上零或整数单位和时间单位对来表示。时间单位解释为:(y) 年、(m) 月、(w) 周、(d) 天、(h) 小时、(n) 分钟和 (s) 秒。作为可选项,在时间表达式后还可以指定三位毫秒值。例如,1997/12/8 10:10:03:452</li>
<li>货币值为 <em>x.y</em> 格式。在此,<em>x</em> 是金额的整数值,<em>y</em> 是小数值。单位没有假定值。</li>
<li>逻辑值为:(t) 或 (true) 对应与 <strong>TRUE</strong>, (f) 或 (false) 对应与 <strong>FALSE</strong>。</li>
<li>矢量 (VT_VECTOR) 表示为:左大括号 ({) 开始、紧跟逗号分隔的值列表,以右大括号 (}) 结束。</li>
<li>单值表达式与矢量相比较表示为:<a href="#RelationalOperators">关系运算符</a>,然后是 (^a)(对应于<em>全部</em>)或 (^s)(对应于<em>一些</em>)。
<li>数字值可以是十进制或十六进制(前面加 0x)。</li>
<li><em>contents</em> 属性值不支持关系运算符,假如指定关系运算符,将找不到任何结果。例如,@contents Microsoft 将查找包含 Microsoft 的文档,但 @contents<strong>=</strong>Microsoft 将什么也找不到。</li>
</ul>

<h3><a name="RegularExpressions">正则表达式</a></h3>

<p>属性查询中的正则表达式定义如下:</p>
返回类别: 教程
上一教程: RESPONSE对象1
下一教程: 防止网站内容被人小偷和采集的ASP代码

您可以阅读与"用ASP怎样编写文档搜索页面(2)"相关的教程:
· 用ASP怎样编写文档搜索页面(5)
· 用ASP怎样编写文档搜索页面(3)
· 用ASP怎样编写文档搜索页面(1)
· 用ASP怎样编写文档搜索页面(4)
· 用ASP怎样编写文档搜索页面(6)
    微笑服务 优质保证 索取样品