无法用asp获取xmlhttp发送的表单
在发送方采用如下方式post一个表单
<script language=javascript>
function Test()
{
str="submit1=Submit&text1=scsdfsd"
var oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
//这里换成你自己的ServerName和VirtualDir
oXmlHttp.Open("POST", "temp.asp", false);
//oXmlHttp.setRequestHeader("Content-Type","text/xml")
oXmlHttp.setRequestHeader("Content-Length",str.length);
//oXmlHttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
oXmlHttp.Send(str);
}
</script>
在服务器接受方采用
<%
Dim xmldom,U_Name,str
Set xmldom = Server.CreateObject("MSXML.DOMDocument")
Response.ContentType = "text/xml"
Response.CharSet = "GB2312"
xmldom.load (Request)
U_Name=Request.Form("text1")
Response.Write U_Name
%>
无法完成接收text1表单项的值
请高手赐教!