php环境下ajax传值中文出现乱码,加入encodeURI
<html> <head> <script src="jquery-1.10.2.min.js"></script> <script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script> $.ajax({ type:'GET', url:"insert.php?ip="+returnCitySN.cip+"¬e="+encodeURI(returnCitySN.cname), success: function(data){ alert(data); }, error: function () { //alert('fail'); } }); </script> </head> <body> </body> </html>