jq ajax post body raw传json

$.ajax(
                {
                    url: '',
                    'data': JSON.stringify({
                  
                    }),
                    'type': 'POST',
                    'processData': false,
                    'contentType': 'application/json', //typically 'application/x-www-form-urlencoded', but the service you are calling may expect 'text/json'... check with the service to see what they expect as content-type in the HTTP header.
                    success: function (msg) {
                        
                    }
                }
            );

猜你喜欢

转载自www.cnblogs.com/gaocong/p/9448482.html