T=GetURL(get_url)
T=bytes2BSTR(T) //将数据转换为字符型式
start=Instr(1,t,start_char)
start2=Instr(start,t,end_char)
t=mid(T,start+start_char_len,start2-start-start_char_len) //取出数据
document.write t
Function GetURL(url)
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
'GetURL = .ResponseText
GetURL = .Responsebody
End With
Set Retrieval = Nothing
End Function
Function bytes2BSTR(vIn)
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
</script>