When you use JavaScript to display messages or pass character data, you often encounter single quotes (') or double quotes (") in the data, which often cause JavaScript to complain. The general adoption/' or/' solution.
For example:
Alert (' This is test ' message '! ');
Alert (' This was test ' message '! ');
It is generally changed to the following statement
Alert ("This is Test/" message/"!");
or
Alert ("This was test ' message '!");
Alert (' This is test/' message/'! ');
The above problem has been solved if the above is used only in scripts or if there are no data character connections that are too complex.
However, if there are more complex data character connections, especially when some of the server-assembled JavaScript statements can be considered, the single quotation mark (') and the person's double quotation mark (") are used to output the escape sequence (escape sequence).
For example, the above statement can be translated into the following format:
Alert ("This is test/u0022message/u0022!");
Alert (' is test/u0027message/u0027! ');
Add some common coding
Character Description Unicode escape sequence
Long dash (-)/u2014
Registry symbol (R)/u00ae
Copyright symbol (c)/U00A9
trademark symbol (?)/u2122
Euro sign (?)/U2 0AC
Backslash (/)/u005c
forward slash (/)/u002f
Opening brace ({)/u007b
closing brace (})/u007d
less than (<)/u003c
greater than sign ;)/u003e
Asterisk (*)/u002a
& &
' (/u0027)
"(/u0022)
< <
>