Uncaught SyntaxError: Unexpected token < in>) at Object.

前端 未结 5 977
终归单人心
终归单人心 2020-12-20 16:57

i have an error in JSON.parse(), i have .php file which contain method to retrieve data from database and .js file for autoComplete function, my .php file return data as str

5条回答
  •  死守一世寂寞
    2020-12-20 16:59

    It's server side error. You can check the value returned from server(php code) using browser's developer tools like firefox and check the response message.

    In addition, maybe you can remove JSON.parse() and add dataType: "json" inside the ajax function

提交回复
热议问题