写了个AJAX
XmlHttp.Open("POST","regUser.ashx?content="+content,true);
当content数据量小时,可以正常传递参数据,当多较大的数据时便出现脚本错误,
有什么方法可改量啊,急啊
------解决方案--------------------------------------------------------
post的话应该把数据放到send上传送
不是放到url的
------解决方案--------------------------------------------------------
XmlHttp的中文乱码问题,网上有很多解决方法,你百度或者google一下就能找到答案!
------解决方案--------------------------------------------------------
HtmlDecode
------解决方案--------------------------------------------------------
- JScript code
var xmlhttp; function viewCategory() { document.getElementById("divlist").innerText="正在加载论坛列表,请稍候......"; xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onreadystatechange=stateChange; xmlhttp.open("POST","CategoryListServer.aspx",true); xmlhttp.send(null); } //判断请求的状态 function stateChange() { if(xmlhttp.readystate==4) { if(xmlhttp.status==200) { document.getElementById("divlist").innerHTML=xmlhttp.responseText; } } }