<%@言語= "jscript" codepage = "936"%>
<scriptlanguage = vbscriptrunat = "server">
functionbytes2bstr(vin)
strreturn = ""
fori = 1tolenb(vin)
thischarcode = ascb(midb(vin、i、1))
ifthischarcode <&h80then
strreturn = strreturn&chr(thischarcode)
それ以外
NextCharcode = ascb(midb(vin、i+1,1))
strreturn = strreturn&chr(clng(thischarcode)*&h100+cint(nextcharcode)))
i = i+1
endif
次
bytes2bstr = strreturn
エンド機能
functionajaxread(theurl)
dimxmlhttp
setXmlhttp = createObject( "microsoft.xmlhttp")
xmlhttp.open "get"、theurl、false
xmlhttp.setRequestheader "content-type"、 "text/html"
xmlhttp.send
dimhtmlstr
htmlstr = bytes2bstr(xmlhttp.responsebody)
ajaxread = htmlstr
エンド機能
</script>
<%
バラドコン;
functionopendatabase(){
試す{
adoconn = newactiveXobject( "adodb.connection");
adoconn.open( "provider = microsoft.jet.oledb.4.0; dataSource ="+server.mappath( "getcaiku.mdb"));
} catch(e){
adoconn.close;
Response.Write( "数据库连接出错、请检查连接字串。");
Response.End;
}
}
functionclosedatabase(){
adoconn.close;
}
Response.Buffer = 1;
server.scripttimeout = 99999;
/////////////////////
varbeginid = 230; //开始id
varendid = 500; //结束id
///////////////////////////////
vararr、tstr、tid、getdata;
varcountid = 0;