|
http://www.timedate.cn/worldclock/ti.asp
像上面这个网页里面的日期,用AU3有什么方法可以获取到里面的日期吗?
下面是网上搜到用VB写的方法!不过我看不懂里面的webbrowser2是什么东东!
插入 webbrowser2
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If URL = "http://www.timedate.cn/worldclock/ti.asp" Then
TEMP = WebBrowser2.Document.body.innertext
temp1 = Left(TEMP, 4)
temp2 = Mid(TEMP, InStr(TEMP, "年") + 1, InStr(TEMP, "月") - InStr(TEMP, "年") - 1)
If Len(temp2) < 2 Then temp2 = "0" & temp2
temp3 = Mid(TEMP, InStr(TEMP, "月") + 1, InStr(TEMP, "日") - InStr(TEMP, "月") - 1)
If Len(temp3) < 2 Then temp3 = "0" & temp3
'dels = " 年月日一二三四五六日七星期 :: "
'For i = 1 To 20
'TEMP = Replace(TEMP, Mid(dels, i, 1), "")
'Next i
'aaa = Left(TEMP, 8)
aaa = temp1 & temp2 & temp3 |
|