相关疑难解决方法(0)

TypeError:jquery 1.9.1版本中的'operand obj'无效'

$.ajax({
    async: false,
    type: "POST",
    url: url+"module/listing/"+projectId,
    data: "ajax=true",
    success: function(response) {
        $.each(response, function(key, val) {
        alert(val.id);
        });
    }
});
Run Code Online (Sandbox Code Playgroud)

这是我的代码.Ajax成功我正在获得JSON响应.响应采用数组格式.我想提醒回应.但是获得"TypeError: invalid 'in' operand obj" JQuery 1.9.1版本的错误.

jquery

10
推荐指数
1
解决办法
3万
查看次数

获取TypeError:使用ajax获取数据时,在'operand obj中无效'

下面是我的ajax电话

 $(document).ready(function() {
     $("#blog").focusout(function() {
         alert('Focus out event call');
         alert('hello');
         $.ajax({
             url: '/homes',
             method: 'POST',
             data: 'blog=' + $('#blog').val(),
             success: function(result) {
                 $.each(result, function(key, val) {
                     $("#result").append('<div><label>' + val.description + '</label></div>');
                 });
             },
             error: function() {
                 alert('failure.');
             }
         });
     });
 });
Run Code Online (Sandbox Code Playgroud)

我在控制台中的'operand obj'错误中遇到'TypeError:invalid'

提前谢谢你

javascript ajax jquery

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

jquery ×2

ajax ×1

javascript ×1