เครื่องมือค้นหาประกอบด้วยไฟล์ HTM และไฟล์ ASP ส่วนใหญ่ใช้ส่วนประกอบ FileSystemObject เพื่อให้บรรลุวัตถุประสงค์ มันมีฟังก์ชั่นที่ทรงพลังและสามารถใช้โดยตรงหลังจากแก้ไขอินเทอร์เฟซ แน่นอนว่ามันจะดีกว่าที่จะเพิ่มสิ่งต่าง ๆ ของคุณเอง
SearchPage.htm
ไฟล์ HTM นี้ใช้เพื่อผ่านเงื่อนไข
<html>
<head>
<title> ตัวอย่างเครื่องมือค้นหา ASP </title>
</head>
<body>
<enter>
<รูปแบบวิธี = โพสต์การกระทำ = search.asp>
<table bgcolor =#cc6633 border = 0>
<tr>
<td rowspan = 3 bgcolor =#cc6633 width = 21 nowrap> </td>
<td width = 363 nowrap> <font color =#fffff>
<ประเภทอินพุต = ชื่อข้อความ = SearchText size = 22>
<อินพุตประเภท = ชื่อช่องแสดง = กรณี>
</font> </td> มีความละเอียดสูงมาก
<td rowspan = 3 width = 10>
<ประเภทอินพุต = ส่งค่า = ตกลง>
<p>
<อินพุตประเภท = รีเซ็ตค่า = ล้าง>
</td>
<td rowspan = 3 bgcolor =#cc6633 width = 28> </td>
</tr>
<tr>
<td width = 363 nowrap> <font color =#fffff> ผลตอบแทนผลลัพธ์
<เลือกชื่อ = rlength>
<ตัวเลือกค่า = 200 ที่เลือก> ข้อความยาว </portion>
<ตัวเลือกค่า = 100> ข้อความสั้น ๆ </petion>
<ตัวเลือกค่า = 0> กลับไปที่การเชื่อมต่อ </potion> เท่านั้น
</เลือก>
<เลือกชื่อ = rresults>
<ค่าตัวเลือก = 10 เลือก> 10
<ค่าตัวเลือก = 25> 25
<ค่าตัวเลือก = 50> 50
</เลือก>
</font>
</td>
</tr>
<tr>
<td width = 363 nowrap> <font color =#fffff> ต้องรวม:
<ประเภทอินพุต = ชื่อช่องทำเครื่องหมาย = iImage>
รูปภาพ
<ประเภทอินพุต = ชื่อช่องทำเครื่องหมาย = izips>
รูปแบบซิป
<อินพุตประเภท = ชื่อช่องทำเครื่องหมาย = ijavas> JavaScript
</font>
</td>
</tr>
</table>
</form>
</enter>
<Dl>
<Dd> </dd>
</dl>
</body>
</html>
-
โปรแกรม ASP ที่แสดงผลลัพธ์
search.asp
<html>
<head>
ผลการค้นหาสำหรับ <title> '<%= คำขอ (searchtext)%>' </title>
</head>
<body>
ผลการค้นหาสำหรับ <b> '<%= คำขอ (searchtext)%>' </b> <br>
-
const fsoforreading = 1
dim objfile, objfolder, objsubfolder, objtextstream
Dim Bolcase, bolfilefound, boltagfound
Dim strcount, strdetag, strext, strfile, strcontent, strroot, strtag, strtext, strtitle, strtitlel