Option Explicit Private Sub Command1_Click() Dim strHTML As String strHTML = GetBody("http://www.cdcgames.net/GetTime/Default.aspx") MsgBox strHTML End Sub Function GetBody(Url) Dim ObjXML Set ObjXML = CreateObject("Microsoft.XMLHTTP") With ObjXML .Open "Get", Url, False, "", "" .Send While .readyState <> 4 DoEvents Wend GetBody = .ResponseBody '或.ResponseText End With GetBody = BytesToBstr(GetBody, "UTF-8") Set ObjXML = Nothing End Function Function BytesToBstr(strBody, CodeBase) Dim ObjStream Set ObjStream = CreateObject("Adodb.Stream") With ObjStream .Type = 1 .Mode = 3 .Open .Write strBody .Position = 0 .Type = 2 .Charset = CodeBase BytesToBstr = .ReadText .Close End With Set ObjStream = Nothing End Function