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
--------------------编程问答--------------------
没能按下按钮
补充:VB , 网络编程