摘要: $.ajax({ dataType : ‘json’ ,type : ‘POST’ ,url : ‘http://localhost/test/test.do’ ,data : {id: 1, type: ‘商品’} ,success : function(data){ } } );问题: 提交后后台action程序时,取到的type是乱码 解决方法: 方法一:提交前采用encodeURI两次编码,记住一定是两次 1.修改以下代码 data:{id:1, type:encodeURI(encodeURI(‘商品’))... 阅读全文
posted @ 2012-11-08 13:28 听风者NJ 阅读(1519) 评论(1) 推荐(0)