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

首頁 > 編程 > ASP > 正文

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

2020-07-27 13:24:43
字體:
來源:轉載
供稿:網友
<HTML><HEAD><TITLE>同文件夾內文本搜索器(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 "已搜索到以下條目,請單擊之。[墨伯編制 于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>請輸入要搜索[在正文中包含]的關鍵詞(</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>&nbsp;</FONT> </P>
<P align=center><INPUT name=T1><INPUT type=button value=搜索! name=B1></P>
<P align=center>&nbsp;</P></BODY></HTML>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 永福县| 榆中县| 遂溪县| 湖南省| 南开区| 高州市| 寿宁县| 鸡泽县| 湄潭县| 保康县| 榆树市| 武陟县| 阜康市| 井研县| 阜平县| 沾化县| 泰宁县| 西平县| 黄浦区| 张家港市| 通江县| 黄梅县| 辰溪县| 电白县| 上犹县| 内丘县| 凯里市| 和平区| 比如县| 遂川县| 吉木乃县| 城口县| 嘉祥县| 加查县| 沙雅县| 建平县| 麻阳| 栖霞市| 浑源县| 定结县| 郎溪县|