Reason: Ajax accepts data types that are not the same as defined
dataType: 'json',
Larvael returns data with one less comma
$mes = array(
'status' => "success",
'message' => "added success"
);
Correct code:
```php
$mes = array(
'status' => "success",
'message' => "added success",
);
Read More:
- Difference between contenttype and datatype in Ajax request of jquery
- The solution of calling$. Ajax successfully but the success method does not respond
- [Solved] it only responds to error and does not enter success after AJAX is successfully processed
- [Solved] ajax Error: Uncaught SyntaxError: Unexpected end of JSON input
- Summary of jQuery autocomplete plug-in
- [Solved] Vue Project Error: Arrow function should not return assignment
- [Solved] VS Code Error: Vetur can‘t find ‘tsconfig.json‘ or ‘jsconfig.json‘
- If the request parameter is formdata, use the Ajax operation
- The solution that needs alert to execute after using ajax
- [Solved] Vue unit test syntax error: unexpected token ‘export‘
- How to Solve JS error: Unexpected end of JSON input,Unexpected token u in JSON at position 0
- [Solved] Vue Project Start Error: Support for the experimental syntax ‘jsx‘ isn‘t currently enabled
- @requestbody: How to Use or Not Use
- [Solved] JQuery each Method Error: $XXX is not defined
- [Solved] Syntax Error: no such file or directory, open ‘F:\webProjectStudy\webProjectStudy\newStudy\24.d
- How to download files by post submission under Ajax
- The reason why jQuery files report errors is introduced
- [Solved] JSON.parse() Error: Unexpected end of JSON input
- Method of adding operation button for each line of data in DataGrid of easyUI
- Error in created hook: “SyntaxError: Unexpected token u in JSON at position 0