Dim XmlHttp
set XmlHttp = CreateObject(" Microsoft。XMLHTTP”)
XmlHttp。打開“GET”,StrUrl,False
XmlHttp.send
Stime = Now '獲取當前時間。
而XmlHttp。ReadyState & lt& gt四
多項活動
Ntime = Now '獲取周期時間
If DateDiff("s ",stime,ntime)& gt;3然後get htmlstr = "":exit function '如果判斷超過3秒,就會超時,退出進程。
行
GetHtmlStr = StrConv(XmlHttp。Responsebody,vbUnicode)
設置XmlHttp =無
結束功能