国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 編程 > ASP > 正文

同文件夾內(nèi)文本搜索器(vbs)

2024-05-04 11:02:39
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
<HTML><HEAD><TITLE>同文件夾內(nèi)文本搜索器(vbs)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<SCRIPT language=vbscript id=clientEventHandlersVBS>
<!--
Dim fso, f, f1, fc,fn,s,uf1,ufn
Sub B1_onclick
fn=T1.value ''
pn=mid(location.pathname,2,len(location.pathname)-14)
ShowFolderList(pn)
End Sub

Function ShowFolderList(path)
''msgbox path
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(path)
Set fc = f.Files
'' ufn=ucase(fn)
For Each f1 in fc
filespec= path & f1.name
ReadEntireFile(filespec)
'' uf1=ucase(f1.name)
'' if instr(uf1,ufn) <> 0 then
'' s=s & "<a href=" & path & f1.name & ">" & f1.name & "</a><br>"
'' end if
Next
document.write "已搜索到以下條目,請(qǐng)單擊之。[墨伯編制 于2003年元月]<br>"
document.write s
set fc=nothing
set f=nothing
set fso=nothing
End Function

Function ReadEntireFile(filespec)
Const ForReading = 1
Dim fso, theFile, retstring
Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile(filespec, ForReading, False)
ufn=ucase(fn)
Do While theFile.AtEndOfStream<> True
retstring = theFile.ReadLine
uf1=ucase(retstring)
if instr(uf1,ufn) <> 0 then
s=s & "<a href=" & path & f1.name & ">" & f1.name & "</a><br>"
exit do
end if
Loop
theFile.Close
ReadEntireFile = s
End Function

-->
</SCRIPT>
</HEAD>
<BODY>
<P align=center><FONT color=#000000 size=6>請(qǐng)輸入要搜索[在正文中包含]的關(guān)鍵詞(</FONT><FONT
color=#000000 size=3>忽略大小寫</FONT><FONT color=#000000 size=6>)</FONT> </P>
<P align=center><FONT size=2><FONT color=#000000>[墨伯編制
于2003年1月5日]</FONT> </FONT> </P>
<P align=center><INPUT name=T1><INPUT type=button value=搜索! name=B1></P>
<P align=center> </P></BODY></HTML>

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 龙游县| 湛江市| 梓潼县| 东兰县| 东安县| 七台河市| 义乌市| 兰坪| 红原县| 麻阳| 积石山| 喀什市| 科技| 个旧市| 香河县| 富平县| 冕宁县| 原平市| 沾益县| 含山县| 德令哈市| 井研县| 托里县| 固安县| 南陵县| 日土县| 丰宁| 健康| 巧家县| 大英县| 紫金县| 安阳县| 遵义市| 韶山市| 太湖县| 汉中市| 恭城| 贵南县| 苏尼特右旗| 枣庄市| 洛隆县|