客户端VBScript脚本
'//客户端VBScript脚本
Function sendHttp(sURL,sArg)
On Error Resume Next
Set sendHttp = Nothing
IF Not navigator.onLine Then
Exit Function
End IF
Dim xmlhttp
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.Open "POST", sURL,false
xmlhttp.Send sArg
IF xmlhttp.responseXML Is Nothing Then
Set xmlhttp = Nothing
Exit Function
End IF
IF xmlhttp.responseXML.xml = "" Then
Set xmlhttp = Nothing
Exit Function
End IF
Set sendHttp = xmlhttp.responseXML
Set xmlhttp = Nothing
End Function
'//客户端VBScript脚本
Function sendHttp(sURL,sArg)
On Error Resume Next
Set sendHttp = Nothing
IF Not navigator.onLine Then
Exit Function
End IF
Dim xmlhttp
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.Open "POST", sURL,false
xmlhttp.Send sArg
IF xmlhttp.responseXML Is Nothing Then
Set xmlhttp = Nothing
Exit Function
End IF
IF xmlhttp.responseXML.xml = "" Then
Set xmlhttp = Nothing
Exit Function
End IF
Set sendHttp = xmlhttp.responseXML
Set xmlhttp = Nothing
End Function
前台调用:
var url ;
url="CSvr.aspx?Key=<%=Request.QueryString("Key")%>&iMode=" +iMode ;
var oxml = sendHttp(url,"") ;
url="CSvr.aspx?Key=<%=Request.QueryString("Key")%>&iMode=" +iMode ;
var oxml = sendHttp(url,"") ;
后台接收:
Dim instream As System.IO.Stream = Page.Request.InputStream
Dim br As System.IO.BinaryReader = New System.IO.BinaryReader(instream, System.Text.Encoding.UTF8)
Dim byt() As Byte = br.ReadBytes(CInt(instream.Length))
Dim sourceXML As String = System.Text.Encoding.UTF8.GetString(byt)
Dim br As System.IO.BinaryReader = New System.IO.BinaryReader(instream, System.Text.Encoding.UTF8)
Dim byt() As Byte = br.ReadBytes(CInt(instream.Length))
Dim sourceXML As String = System.Text.Encoding.UTF8.GetString(byt)