【VB技巧】VB WebBrowser 对ASP提交表单

  • A+
所属分类:lcx

    VB WebBrowser控件对ASP提交表单,VB 对ASP提交表单,VB WebBrowser对ASP提交表单,WebBrowser控件对ASP提交表单,WebBrowser对ASP提交表单,VB WebBrowser 提交表单,VB ASP提交表单,WebBrowser 提交表单,WebBrowser ASP提交表单,VB WebBrowser ASP 提交表单。

VB WebBrowser控件对ASP提交表单:

Private Sub Form_Load()
    WebBrowser1.Navigate "http://219.xxx.xxx.195/Action.asp"
End Sub

Private Sub WebBrowser1_DownloadComplete()
    Dim vDoc, vTag
    Dim i As Integer
    Set vDoc = WebBrowser1.Document
    For i = 0 To vDoc.All.Length - 1                                            '检测所有标签
        If UCase(vDoc.All(i).tagName) = "INPUT" Then                            '找到input标签
            Set vTag = vDoc.All(i)
            If vTag.type = "text" Then                                          '检测类型
                Select Case vTag.Name
                    Case "UserID"                                               '填写用户名的文本框的值
                        vTag.Value = "ddddd"
                End Select
            End If
            If vTag.type = "password" Then                                      '检测密码框类型
                Select Case vTag.Name
                    Case "Password"                                             '密码框的值
                        vTag.Value = "dd"
                End Select
            End If
            If vTag.type = "submit" And vTag.Value = " 登 录 " Then             '登陆按钮
                vTag.Click
            End If
        End If
    Next i
End Sub

文章来源于lcx.cc:【VB技巧】VB WebBrowser 对ASP提交表单

相关推荐: 全能型反汇编引擎 - Capstone-Engine

Capstone是一个轻量级的多平台多架构支持的反汇编框架。支持包括ARM,ARM64,MIPS和x86/x64平台。今天1.0版本正式向公众开放下载,可以在http://www.capstone-engine.org/download.html获取到最新的代…

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: