level 7
几乎都用它来完成采集任务了!贡献出来啊,很简单滴Function strCut(strContent, StrStart, StrEnd) As String '通用截取函数 Dim strHtml, S1, S2 As String dim strstart,strend as string strHtml = strContent On Error Resume Next S1 = InStr(strHtml, StrStart) + Len(StrStart) S2 = InStr(S1, strHtml, StrEnd) strCut = Mid(strHtml, S1, S2 - S1) End FunctionPrivate Sub Form_Load()Dim hunzi1, hunzi2 As Stringhunzi1 = "
this is title"hunzi2 = strCut(hunzi1, "
", "")MsgBox hunzi2End Sub
2007年08月28日 19点08分
2
level 6
Dim dt As HTMLDocumentSet dt = WebBrowser1.DocumentMe.Caption = dt.getElementsByTagName("title")(0).innerText
2007年08月28日 23点08分
4
level 7
楼主,不是很明白你的意思,是取得IE中网页中的标题呢?》还是webbrowser里的呢?
2007年08月29日 01点08分
5
level 7
【CBM666 捕获运行中的网页句柄标题与URL】http://hi.baidu.com/cbm666/blog/item/9eec33fa9bd5d41ca9d3115d.html
2007年08月29日 02点08分
6
level 1
回4楼:我也用webbrowser;运行后,我输入网址“http://post.baidu.com/f?kz=255370663”;打开网页后,标题栏怎么只显示“http:///”,不显示“百度_vb吧_用vb怎么获取网页标题...”呀?
2007年08月29日 04点08分
7
level 10
不用那么麻烦 其实上面所找到的title 在属性里面有一般的如果请求到一个网页 如果title存在就是WebBrowser.LocationName如果title不存在就是WebBrowser.LocationURL
2007年08月29日 05点08分
8
level 10
我的浏览器的函数Private Function Web_GetName(Index As Integer) As String With brwWebBrowser(Index) If .LocationName = "" Then Web_GetName = .LocationURL Else Web_GetName = .LocationName End If End WithEnd Function
2007年08月29日 05点08分
9
level 10
演示抵制http://gcyun.68ab.com/dl/Web_Browser.rar
2007年08月29日 05点08分
10
level 1
Me.Caption = WebBrowser1.LocationName & WebBrowser1.LocationURL这样一起显示出来!
2007年08月29日 06点08分
12
level 1
Me.Caption = WebBrowser1.LocationName & WebBrowser1.LocationURL
这样一起显示出来!
2011年03月11日 17点03分
13
level 1
WebBrowser1.document.title
就行了,搞那么麻烦
2011年03月11日 18点03分
14