1. Ajax请求设置Type为Form-Data

在你Ajax请求中加上

headers : {
    'Content-Type' : 'application/x-www-form-urlencoded'
},

示例:

$.ajax({
    type : "POST",
    url : "../user/repwd",
    headers : {
      'Content-Type' : 'application/x-www-form-urlencoded'
    },
    data : data,
    dataType : "json",
});

Copyright © 试剑江湖 2020 all right reserved,powered by Gitbook修订时间: 2023-02-26 13:36:33

results matching ""

    No results matching ""