解决方案一:(修改jquery.js)
修改前:
ajaxSettings:{
url:location.href,
global:true,
type:"GET",
contentType:"application/x-www-form-urlencoded",
processData:true,
async:true,
.....
修改后:
ajaxSettings:{
url:location.href,
global:true,
type:"GET",
contentType:"application/x-www-form-urlencoded;charset=UTF-8",
processData:true,
async:true,
.....
调用的时候:
$.ajax({
contentType:"application/x-www-form-urlencoded;charset=UTF-8",
......
只需要简单的将JQuery的代码加以修改,加上charset=UTF-8就可以了,这样不需要改变改什么web.config或什么在页面中改编码什么的了,也不需要用escapc(str)再在服务端解码。英文怎么传递,中文也怎么传递。