50分送高手:这段源码取网页源码时,为什么报错?
Private Sub Web2_NewWindow2(ppDisp As Object, Cancel As Boolean)
Set ppDisp = Web3.object
End Sub
'第1种点击的方法,我以前常用,也报错
Web2.Navigate2 "http://www.360114.com/See_Url_one.asp?operator=88127CEF4ABBB1A22EBC0 "
'第2种点击的方法,我以前常用,报错.其中web2URL0= "http://www.360114.com/See_Url_one.asp?operator=88127CEF4ABBB1A22EBC0 "
private Sub Web2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If Not (pDisp Is Web2.object) Then Exit Sub
If URL = web2URL0 Then
'Web2.Silent = True
web2URLSum = Web2.Document.links.length - 1
For web2URLNo = 0 To web2URLSum
If Web2.Document.links(web2URLNo).innerText = "电子名片 " Then
Web2.Document.links(web2URLNo).Click '第2种点击的方法,我以前常用,报错
Exit For
End If
Next
End If
End Sub
[解决办法]
Web2.Navigate2 "http://www.360114.com/See_Url_one.asp?operator=88127CEF4ABBB1A22EBC0 "
我也有过这样的出错,你只要把text1.text= "http://www.360114.com/See_Url_one.asp?operator=88127CEF4ABBB1A22EBC0 "
然后Web2.Navigate2 text1.text
就可以了!
[解决办法]
..........
呵呵...
这个么........
是COOKIE的问题......先把COOKIE写到Document然后再写DocumenTelement.InnerHTML