Webbrowser怎么判断网页里某个ID是否存在
1个回答
2016-09-22
展开全部
Webbrowser怎么判断网页里某个ID是否存在
你是用什么方法打开网页的呢?如果是用WebBrowser控件,那么很简单:
Private Sub WebBrowser1_NavigateError(ByVal pDisp As Object, URL As Variant, Frame As Variant, StatusCode As Variant, Cancel As Boolean)
MsgBox "网页打开失败!"
Cancel = True
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If pDisp Is WebBrowser1.Object Then
'这里放点击页面的代码
End If
End Sub
你是用什么方法打开网页的呢?如果是用WebBrowser控件,那么很简单:
Private Sub WebBrowser1_NavigateError(ByVal pDisp As Object, URL As Variant, Frame As Variant, StatusCode As Variant, Cancel As Boolean)
MsgBox "网页打开失败!"
Cancel = True
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If pDisp Is WebBrowser1.Object Then
'这里放点击页面的代码
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询