'以下代码由yoop编写,所需控件text1、text2、command1、webbrowser1
'代码利用webbrowser获取HTML标签
'进行帐号和密码输入后登陆网页
Dim vDoc, vTag
Dim i As Integer
Private Sub Command1_Click()
Dim ObjDoc As HTMLDocument
Set ObjDoc = WebBrowser1.Document
ObjDoc.getElementById("username").Value = Text1.Text
ObjDoc.getElementById("password").Value = Text2.Text
ObjDoc.getElementById("loginsubmit").Click
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate "http://www.52pojie.cn/logging.php?action=login"
End Sub