TypeError: invalid 'in' operand obj
尝试在程序去访问远程的Web API,它在运行时,出现异常:
TypeError: invalid 'in' operand obj
$(function () { $.ajax({ type: "GET", url: "http://localhost:9001/api/size", dataType: "json", contentType: "application/json; charset=utf-8", success: function (data) { data = $.parseJSON(data); $.each(data, function (index, item) { //... }); }, error: function (jqXHR, textStatus, errorThrown) { alert(errorThrown); } }); });