网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的考试资料:

 

标题 用来猜后台的hta小程序
内容
    代码如下:
    <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>
    最后一个比较好用
随便看

 

在线学习网考试资料包含高考、自考、专升本考试、人事考试、公务员考试、大学生村官考试、特岗教师招聘考试、事业单位招聘考试、企业人才招聘、银行招聘、教师招聘、农村信用社招聘、各类资格证书考试等各类考试资料。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/17 19:24:25