28,391
社区成员
发帖
与我相关
我的任务
分享
Public Function GetRemoteFile(ByVal RemotePath,ByVal CSet)
On Error Resume Next
Dim ObjHttp,ObjStm,StrHead,TempBody
Set ObjStm = CreateObject(ObjStmStr)
ObjStm.Type = 1
ObjStm.Mode = 3
ObjStm.Open
Set ObjHttp=Server.CreateObject(ObjXmlHttpStr)
ObjHttp.Open "Get", RemotePath , False
ObjHttp.send
If ObjHttp.readyState<>4 Then Exit Function
If ObjHttp.Status > 300 Then Exit Function
ObjStm.Write (ObjHttp.responseBody)
Set ObjHttp=Nothing
ObjStm.Position = 0
ObjStm.Type = 2
ObjStm.Charset = Trim(CSet)
GetRemoteFile = ObjStm.ReadText
ObjStm.Close:Set ObjStm = Nothing
Exit Function
End Function
Public Function BytesToBstr(ByVal strBody,ByVal CodeBase)
Dim ObjStm,TempBody
Set ObjStm = Server.CreateObject(ObjStmStr)
With ObjStm
.Type = 1
.Mode =3
.Open
.Write strBody
.Position = 0
.Type = 2
.Charset = CodeBase
End With
TempBody = ObjStm.ReadText
ObjStm.Close:Set ObjStm = nothing
BytesToBstr=TempBody
End Function
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<%
Response.Write(Request.Cookies("User"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.3.min.js"></script>
<script type="text/javascript">
$.ajax({
type: "POST",
url: "http://Domain.com/1.asp",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
</script>
</body>
</html>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<%
Response.Write(Request.Cookies("User"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.3.min.js"></script>
<script type="text/javascript">
$.ajax({
type: "POST",
url: "http://Domain.com/1.asp",
success: function(msg){
alert( "Data Saved: " + msg );
}
});
</script>
</body>
</html>