能看的懂的高手给加上注释吧,
<script language=JavaScript>
function getonlinenum()
{
var objXMLHTTP=new ActiveXObject("MICROSOFT.XMLHTTP");
objXMLHTTP.open("GET","http://www.sdxnw.gov.cn/qxxn_yb_lists.asp?qxxn=12",false);
objXMLHTTP.send("");
var strReturn=objXMLHTTP.ResponseBody;
online_num.innerHTML=bytes2BSTR(strReturn);
}
</script>
<script language=VBScript>
function bytes2BSTR(vIn)
dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
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>
</head>
<body onload="getonlinenum()">
<span id=online_num></span>