Getting TypeError: invalid 'in' operand obj while fetching data using ajax

后端 未结 3 1603
死守一世寂寞
死守一世寂寞 2020-12-19 05:58

Below is my ajax call

 $(document).ready(function() {
     $(\"#blog\").focusout(function() {
         alert(\'Focus out event call\');
         alert(\'hell         


        
相关标签:
3条回答
  • 2020-12-19 06:16

    Mention a dataType attribute in your ajax call.It consider text by default.That's why not able to iterate on result

    dataType:'json'
    

    Because your result should be array or json

    0 讨论(0)
  • 2020-12-19 06:30

    the 'result' in success function should be an array

    0 讨论(0)
  • 2020-12-19 06:36

    Shouldn't data be an object?

    data: {
        blog: $('#blog').val()
    },
    
    0 讨论(0)
提交回复
热议问题