该Web服务属于您还是您使用其他人的Web服务?Web服务不接受的原因是什么(,/?:@&= + $#)?
jQuery $ .ajax 默认contentType为 application / x-www-form-urlenpred
,这意味着jQuery将对内容进行编码。但是,由于您指定了不同的contentType,因此不会对数据进行编码,因此您必须自己进行编码。
另外,您可以尝试删除 contentType 选项,并正常传递您的内容(不带 enpreURICompnent )。
$.ajax({ type: "POST", url: "../WebServices/Feedback.svc/sendfeedback", dataType: 'json', async: false, data: '{"stars": "' + stars + '", "rating" : "' + rating + '", "note" : "' + note + '", "pre" : "' + pre + '", "permission" : "' + permission + '"}',});


