用Post方法提交数据时,提交了一个很长的字符串,总是提示没有权限。
var objhttp= new ActiveXObject("msxml2.xmlhttp");
objhttp.open("Post","jzh_receive.aspx?jzh="+strxml,false);
objhttp.send();
zbzy=objhttp.responsetext
strxml长度不固定
--------------------------------------------------------------------------------
objhttp.open("Post","jzh_receive.aspx?jzh="+strxml,false);
strxml数据很长,不应该用这种方法,用
strA = "submit1=Submit&text1=scsdfsd";//Looks like QueryString,But there's no "?" here!
var oReq = new ActiveXObject("MSXML2.XMLHTTP");
oReq.open("POST","jzh_receive.aspx",false);
oReq.setRequestHeader("Content-Length",strA.length);
oReq.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");//没有这句就玩不转拉
oReq.send(strA);
--------------------------------------------------------------------------------
http://dotnet.aspx.cc/ShowDetail.aspx?id=ATV1GLXT-65FF-4M82-CT5U-B1J65D3ZN2OK
--------------------------------------------------------------------------------
TO:net_lover(孟子E章)
提交到服务器端后汉字全变成了乱字符,怎么解决???
--------------------------------------------------------------------------------
strA = "submit1=Submit&text1="+strxml;
var oReq = new ActiveXObject("MSXML2.XMLHTTP");
oReq.open("POST","jzh_receive.aspx",false);
oReq.setRequestHeader("Content-Length",strA.length);
oReq.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
孟先生提供的这个方法可以,但是提交到服务端后出现乱字符。
孟先生又给了下面这个方法,但是下面这段代码,怎么加到上面代码里?
xmlhttp.setRequestHeader("Content-Type","text/xml")
<%
Response.ContentType = "text/xml"
Response.CharSet = "GB2312"
%>
--------------------------------------------------------------------------------
gz
--------------------------------------------------------------------------------
直接加在當前頁面的頂部。