1. When JAVASCRIPT is referenced, the character languages used are inconsistent.
For example, <script type = "text/javascript" src = "xxx. js "charset =" UTF-8 ">. xxx. js file is used inside the GB2312 format, calling outside is used UTF-8, so some special characters inside the file because of inconsistent formats, garbled, this cause.
2. When JAVASCRIPT outputs HTML characters, the front and back labels do not match.
This is common. when outputting a string, single quotation marks (') or double quotation marks (") are not paired, or. when writing (), the single quotation mark (') or double quotation mark (") is not correctly output (")
3. HTML markup language or line break in the Parameter
This is the case I encountered today, because the data I got is passed to a function as a parameter. As a result, the data contains a line break, causing this error.
For example, it is normal to use only a single row of data during the test. This error is not reported ,.
This error occurs when multiple lines of data are used during the test and the carriage return link is used for line feed.
In 3rd cases, my solution is to assign a value to a hidden text instead of passing the data as a parameter, you only need to read the content in the text in the function to be called.