1.如何用vb得到网页的网页网页源代码
如何用vb得到网页的源代码
1 先加载网页:
Private Sub Form_Load()
WebBrowser1.Navigate "/question/.html"
End Sub
2 加载完成后取字符串到文本框:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim doc As Object, objhtml As Object
Dim strhtml As String
On Error GoTo errorsub
Me.Caption = WebBrowser1.LocationName & " 加载完成"
If MaxWebNum <= 0 Then
Set doc = WebBrowser1.Document
Set objhtml = doc.body.createtextrange()
If Not IsNull(objhtml) Then
strhtml = WebBrowser1.Document.body.innertext
Text1.Text = strhtml
End If
End If
Exit Sub
errorsub:
Text1.Text = "错误!!源码源码校园租赁平台源码!网页网页感恩父母的网站源码"
源码源码php源码文件自动换行End Sub
源码源码php源码文件自动换行辛祖脫「魔」即吻多蒙特隊徽 熱刺防線一進一出
彩83源码_彩38系统源码完美版
shttpd 源码分析
狂风pvppve源码_狂风装备
巡迴開跑!劉德華high喊「我回來了!」 經典曲連發引粉絲尖叫
cem系统源码