Using $.ajax () Back-end PHP to get the string, there is only loginsuccess or loginfaild to return a few characters, using alert () and Console.log () to see there is nothing wrong, but with Firebug debugging see, The return value character is appended with a few rnrn characters, which causes the JS judgment to fail.
To search the Internet, but also someone encountered a similar situation, I tried the jquery1.8 and 1.3 of the library, will be more out of these newline characters, do not know this is a jquery bug, or what reason?
Http://www.cnblogs.com/js-html/p/3384940.html
Reply content:
Using $.ajax () Back-end PHP to get the string, there is only loginsuccess or loginfaild to return a few characters, using alert () and Console.log () to see there is nothing wrong, but with Firebug debugging see, The return value character is appended with a few rnrn characters, which causes the JS judgment to fail.
To search the Internet, but also someone encountered a similar situation, I tried the jquery1.8 and 1.3 of the library, will be more out of these newline characters, do not know this is a jquery bug, or what reason?
Http://www.cnblogs.com/js-html/p/3384940.html
- Asked 2 hours ago
- Comments
- Invitation to answer
Please login and comment first
Sort By default sorting time
1 answers
The answer is helpful to the person, has the reference value 0 The answer is no help, it's the wrong answer, irrelevantly replying .
Check for extra white space characters outside of PHP tags
Http://stackoverflow.com/questions/11593326/unwanted-new-line-returned-after-ajax-request