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

首頁 > 編程 > ASP > 正文

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

2024-05-04 10:58:58
字體:
來源:轉載
供稿:網友
<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> </FONT> </P>
<P align=center><INPUT name=T1><INPUT type=button value=搜索! name=B1></P>
<P align=center> </P></BODY></HTML>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 前郭尔| 凉山| 抚顺市| 高雄县| 鹰潭市| 安龙县| 苍南县| 工布江达县| 庆元县| 陆河县| 五寨县| 辽源市| 图们市| 巧家县| 株洲县| 万宁市| 眉山市| 济阳县| 宣武区| 庄河市| 红原县| 霍邱县| 拉萨市| 铁力市| 罗甸县| 邮箱| 左贡县| 彩票| 古浪县| 石泉县| 田东县| 宣恩县| 洛阳市| 建瓯市| 无极县| 利辛县| 中牟县| 梁平县| 英吉沙县| 庄浪县| 绵阳市|