我找到了vb的程序,可是这种方式好像在delphi中不能用。程序如下:(有谁能把它翻译成delphi的吗?)
Private Sub Command1_Click()
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" Or vTag.Type = "password" Then '看看是不是我们需要的
Select Case vTag.Name '按标签的名字,对号操做
Case "EMAILADD"
vTag.Value = "myemail@home.com" '这里写入你的e-mail
Case "PASSWD"
vTag.Value = "password" '这里写入你的密码
End Select
ElseIf vTag.Type = "submit" And vTag.Name = "SUB" And vTag.Value
= "订阅" Then
'找到提交按钮
vTag.Select '也可以没有这个
vTag.Click '点击提交了,一切都OK了
End If
End If
Next i
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "http://dhunter.51.net"
End Sub