以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]获取网页地址 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=90832) |
-- 作者:188802386 -- 发布时间:2016/9/22 15:31:00 -- [求助]获取网页地址 Dim web As new windows.forms.webbrowser web.ScriptErrorsSuppressed = True web.Navigate("http://weidian.eallcn.com/232621561/mmfy/mmfydetail/id=3603988") Do Until web.ReadyState = 4 Application.DoEvents Loop For Each dl As object In web.Document.GetElementsByTagName("li") Dim url = dl.GetAttribute("data-background") If url > "" Then output.show(url) End If Next 用msgbox.show是每个网址弹出一个窗口,网址最多只有10个,但也有可能不足10个,但使用output.show能显示出所有的网址地址,请问如何使用output.show来实现 output.show(网址1) output.show(网址2) output.show(网址3) output.show(网址4) ...... output.show(网址10)
|
-- 作者:188802386 -- 发布时间:2016/9/22 15:31:00 -- 截图如下 |
-- 作者:有点蓝 -- 发布时间:2016/9/22 15:37:00 -- ![]() If url > "" Then dim dr as row = tables("表A").addnew dr("某列") = url End If |
-- 作者:188802386 -- 发布时间:2016/9/22 15:45:00 -- 蓝老师,我是想把这些网址增加到一行的多个列,而不是一个网址一行 |
-- 作者:有点蓝 -- 发布时间:2016/9/22 16:16:00 -- 花点时间学习一下狐表的编程基础,想做什么都可以。一味只靠别人,更加浪费时间 dim dr as row = tables("表A").addnew dim idx as integer = 1 For Each dl As object In web.Document.GetElementsByTagName("li") Dim url = dl.GetAttribute("data-background") If url > "" Then dr(idx) = url idx += 1 End If Next |