jQuery AJAX Success

后端 未结 6 1492
独厮守ぢ
独厮守ぢ 2021-01-17 10:08

I\'m using jQuery\'s $.ajax function to submit a form, which works, but the success is where I\'m having my problem. Here is my code:

$(\"#form\         


        
6条回答
  •  一个人的身影
    2021-01-17 10:33

    I know it might be late however I was having this same issue today and the problem was that the correct string was returned to success, however for some reason it had an extra newline character in front of it. Locally this did not happen however when I put it up online a newline was always added to the string being returned (in your case dataCheck). I used the substr() function to get rid of the newline at the end and it worked fine from there on.

提交回复
热议问题