Ajax中使用Post提交 中文及参数传递问题
1
xmlhttp.open("post",url,true);
2
//以下两行解决中文参数问题
3
xmlhttp.setrequestheader("cache-control","no-cache");
4
xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
5
//传递参数
6
xmlhttp.send("name="+name);

2

3

4

5

6
