$.ajax({ url:templateRoot+"user//getLogin",contentType: "application/json",type:"post",data:JSON.stringify({"name":name,"pwd":pwd}),dataType:"json",success:function(data){ } });必须加上contentType: "application/json"这句。 原文链接:https://www.f2er.com/ajax/161845.html