}
//创建请求结果处理程序
xmlhttp.onreadystatechange=function()
{
if (4==xmlhttp.readyState)
{
if (200==xmlhttp.status)
{
var today = new Date();
today = today.toFormattedString("yyyy年MM月dd日");
var resp = xmlhttp.responseBody;
var Weather = bytes2BSTR(resp);//在这里调用Vbscript的方法转换就OK了
//........................
//-->
</script>
<script language="vbscript">
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