用ADODB.Stream转换,用streamtochar这个函数
<HTML>
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=Big5">
<title>test</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.onerror = function (err) {
return false;
};
//-->
</SCRIPT>
<script language="vbscript">
<!--
'获取地址
dim sUrl
sUrl="http://www.aastocks.com/chi/Login/Login.asp"
Function streamtochar(StrStream)
set stream=CreateObject("ADODB.Stream")
stream.type=1
stream.Mode=3
stream.Open
stream.Write Strstream
stream.Position= 0
stream.Type= 2
stream.Charset="BIG5"
streamtochar= stream.ReadText
stream.Close
set stream=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
'函数,得到内容
function getContentByUrl(url)
'建立对象
set oXmlHttp = CreateObject("MSXML2.XMLHTTP")
oXmlHttp.open "GET",url,false
oXmlHttp.send
getContentByUrl = streamtochar(oXmlHttp.responseBody)
set oXmlHttp=nothing
end function
'函数,获得网站内容
function getRealContent(url)
sContent = getContentByUrl(url)
getRealContent=sContent
end function
'-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<SCRIPT LANGUAGE=vbscript>
<!--
str=getRealContent(sUrl)
'document.write "<xmp>"&str &"</xmp>"
'document.write str
document.write "<META http-equiv=""Content-Type"" content=""text/html; charset=Big5"">"&str
'-->
</SCRIPT>
</BODY>
</HTML>
<HTML>
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=Big5">
<title>test</title>
<SCRIPT LANGUAGE="JavaScript">
<!--
window.onerror = function (err) {
return false;
};
//-->
</SCRIPT>
<script language="vbscript">
<!--
'获取地址
dim sUrl
sUrl="http://www.aastocks.com/chi/Login/Login.asp"
Function streamtochar(StrStream)
set stream=CreateObject("ADODB.Stream")
stream.type=1
stream.Mode=3
stream.Open
stream.Write Strstream
stream.Position= 0
stream.Type= 2
stream.Charset="BIG5"
streamtochar= stream.ReadText
stream.Close
set stream=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
'函数,得到内容
function getContentByUrl(url)
'建立对象
set oXmlHttp = CreateObject("MSXML2.XMLHTTP")
oXmlHttp.open "GET",url,false
oXmlHttp.send
getContentByUrl = streamtochar(oXmlHttp.responseBody)
set oXmlHttp=nothing
end function
'函数,获得网站内容
function getRealContent(url)
sContent = getContentByUrl(url)
getRealContent=sContent
end function
'-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<SCRIPT LANGUAGE=vbscript>
<!--
str=getRealContent(sUrl)
'document.write "<xmp>"&str &"</xmp>"
'document.write str
document.write "<META http-equiv=""Content-Type"" content=""text/html; charset=Big5"">"&str
'-->
</SCRIPT>
</BODY>
</HTML>
标签:
用ADODB.Stream转换
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“用ADODB.Stream转换”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。