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
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.