jquery Ajax Backend Response succeeded, returning the correct JSON but not executing the Success method, performing an error problem

Source: Internet
Author: User

I was stuck with the problem for hours yesterday. To view the HTTP status code: 200, and return the expected JSON string. however, the error method is executed and the success method is not Executed. Check on the internet, only to find that the background page returned the JSON string format is not correct, my error is the colon ":" is written as a comma ",". There will be the Ajax front-end JS code directly invoke the method in the error, such as the Problem.

You can go to the JSON online verification Web site to see if your JSON string is correct, if it is the JSON toolkit generated by the JSON string is not a Problem.

jquery Ajax Backend Response succeeded, returning the correct JSON but not executing the Success method, performing an error problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.