script language=vbs>
function isExist(url)
dic="c:\dic.dic"
Set fso = CreateObject("Scripting.FileSystemObject")
set zidian=fso.OpenTextFile(dic,1,False)
Do While zidian.AtEndOfStream > true
path=zidian.readline
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET",http.value+path,false
xmlhttp.send
t.innerHTML = t.innerHTMLurlpath"--------"xmlhttp.status"br>"
loop
End Function
/script>
JS版写法:
如果换js,要将第二行的“onclick=vbs:isExist(http.value)”里的"vbs:"去掉
字典放在页面里的写法vbscript版:
function isExist(url)
set objFile = CreateObject("SAFRCFileDlg.FileOpen")
intRet = objFile.OpenFileOpenDlg
if intret then
dic= objFile.filename
end if
if dic>"" then
Set fso = CreateObject("Scripting.FileSystemObject")
set zidian=fso.OpenTextFile(dic,1,False)
If 2 = MsgBox( "字典为:" objFile.filename vbCrLf " 您确定吗?", 32 + 1, "请确认" ) Then isExist(http.value)
Do While zidian.AtEndOfStream > true
path=zidian.readline
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET",http.value+path,false
xmlhttp.send
t.innerHTML = t.innerHTMLurlpath"--------""font color=red>"xmlhttp.status"/font>br>"
loop
end if
End function
/script>
最后一个比较好用