
VB读取网页数据
我想用VB读取网页里的数据,http://www.js-lottery.com/dlt/dltlssj/index.html是个彩票的开奖号码。只要读出最新一期的期号和号...
我想用VB读取网页里的数据,
http://www.js-lottery.com/dlt/dltlssj/index.html
是个彩票的开奖号码。
只要读出最新一期的期号和号码,每个号码之间用","隔开,并保存到txt文本中。
我是个初学者,希望能够说明要用到哪些控件,并能够贴出代码!多谢了! 展开
http://www.js-lottery.com/dlt/dltlssj/index.html
是个彩票的开奖号码。
只要读出最新一期的期号和号码,每个号码之间用","隔开,并保存到txt文本中。
我是个初学者,希望能够说明要用到哪些控件,并能够贴出代码!多谢了! 展开
展开全部
Microsoft Internet Tramnsfer Control 6.0 控件
Dim sj As String
Private Sub Command1_Click()
sj = Inet1.OpenURL("http://www.js-lottery.com/dlt/dltlssj/index.html")
sj = Mid(sj, InStr(sj, "详情</td>"), 600)
Text1.Text = Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 4, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & ",+"
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
End Sub
Dim sj As String
Private Sub Command1_Click()
sj = Inet1.OpenURL("http://www.js-lottery.com/dlt/dltlssj/index.html")
sj = Mid(sj, InStr(sj, "详情</td>"), 600)
Text1.Text = Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 4, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & ",+"
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
sj = Mid(sj, InStr(sj, " ") + 1, 600)
Text1.Text = Text1.Text & "," & Mid(sj, InStr(sj, " ") - 3, 2)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询