1.JAVASCRIPT reference, the character language used is inconsistent. For example: <script type= "Text/javascript" src= "Xxx.js" charset= "utf-8″>.xxx.js" file is used inside the GB2312 format, the outside call uses the UTF-8, Therefore, some special characters inside the file because of inconsistent format, there are garbled, causing this reason.
2.JAVASCRIPT output HTML characters, the front and back tags do not match. This is more common, often when the string is output, single quotes (') or double quotes (") are not paired, or when document.write () is not correctly output single quotes (') or double quotes (")
3. HTML markup Language within parameters or include line breaks What I have come across today is this situation. Because the data I get is passed as a parameter to a function, which contains a newline character, causing this error.
For example: General test only use a single line of data, is normal, does not appear this error.
This error occurs when you use multiple rows of data in a test and use the carriage return chain to wrap. Because it contains a line break.
For the 3rd case, my solution is to not pass the data directly as a parameter, but to first assign it to a hidden text, and the function that needs to be called simply reads the contents of the text.
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