当前位置:编程学习 > VB >>

VB6 网页按钮 求救!!

那个"登录"按钮,没有id.而我又要 .click它,那怎么办呢?
CODE:
<input type="submit" value="Enter Game">
它html源码是这样的:
<form action="game.phtml" method="post">
<input type="hidden" name="type" value="enter_game">
<input type="submit" value="Enter Game">
</form>

WebBrowser1.Document.getElementById("enter_game").Click <<失败 --------------------编程问答-------------------- <input type="submit" value="Enter Game"  onclick="函数名"> --------------------编程问答-------------------- Private Sub Command1_Click()
    On Error Resume Next
    With CreateObject("internetexplorer.application")
        .Visible = True
        .Navigate "http://www.xxxxxxx.html"
        Do Until .ReadyState = 4
            DoEvents
        Loop
        Set r = .document.All.tags("input")
        For i = 0 To r.length - 1
            If r(i).Value = "Enter Game" Then r(i).Click
        Next i
    End With
End Sub
--------------------编程问答--------------------
引用 2 楼 a814153a 的回复:
Private Sub Command1_Click()
    On Error Resume Next
    With CreateObject("internetexplorer.application")
        .Visible = True
        .Navigate "http://www.xxxxxxx.html"
      ……

没能按下按钮
补充:VB ,  网络编程
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,