我认为,
$.ajax()如果您想更改编码,则可能必须使用,请参见
contentType下面的参数(
successand
error回调假定您具有
<div id="success"></div>和
<div id="error"></div>html中的内容):
$.ajax({ type: "POST", url: "SomePage.aspx/GetSomeObjects", contentType: "application/json; charset=utf-8", dataType: "json", data: "{id: '" + someId + "'}", success: function(json) { $("#success").html("json.length=" + json.length); itemAddCallback(json); }, error: function (xhr, textStatus, errorThrown) { $("#error").html(xhr.responseText); }});我实际上只需要一个小时左右就可以完成,真是巧合!



