배경 을 맞 추 는 HTA 애플 릿

3754 단어 백 스테이지

<input type=text id=http size=28 style="color:888888" value="http://www.haiyangtop.net">
<input type=button onclick=vbs:isExist(http.value) value=" url " style="color:888888">
<div id="t"></div>

<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.innerHTML&url&path&"--------"&xmlhttp.status&"<br>"
       loop
End Function
</script>

JS 버 전 쓰기:
js 를 바 꾸 려 면 두 번 째 줄 의"onclick=vbs:isExist(http.value)"의"vbs:"를 제거 해 야 합 니 다.

<script>
function isExist(url)
{
var myObject = new Object();
myObject.lcx1 = "/admin/index.asp";
myObject.lcx2 = "/safety";
myObject.lcx3 = "/safetyx";
for (lcx in myObject)
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.open("GET",http.value+myObject[lcx],false)
xmlhttp.send()
if(xmlhttp.status==200)
t.innerHTML += url+myObject[lcx]+" <br>";
else
t.innerHTML+= url+myObject[lcx]+" <br>";
}
}
</script>
페이지 에 사전 을 넣 은 쓰기 vbscript 버 전:

<script language=vbs>
function isExist(url)
Dim d  
       Set d = CreateObject("Scripting.Dictionary")
       d.Add "a","/admin/index.asp"
       d.Add "b", "/safety"
       d.Add "c", "/safetyx"
       a = d.Keys
       For i = 0 To d.Count -1 ' 。
       set xmlhttp = CreateObject("Microsoft.XMLHTTP")
       xmlhttp.open "GET",http.value+d.Item(a(i)),false
       xmlhttp.send
       if xmlhttp.status=200 then
       t.innerHTML = t.innerHTML+url+d.Item(a(i))+" <br>"
       else
       t.innerHTML = t.innerHTML+url+d.Item(a(i))+" <br>"
       end if
       Next
       end function
</script>

<input type=text id=http size=28 style="color:888888" value="http://www.haiyangtop.net">
<input type=button onclick=isExist(http.value) value=" " style="color:888888">
<div id="t"></div>
<script language=vbs>

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.innerHTML&url&path&"--------"&"<font color=red>"&xmlhttp.status&"</font><br>"
     loop
end if
End function
</script>

마지막 이 좋아요.

좋은 웹페이지 즐겨찾기