Cause of garbled code: The encoding format of your jsp page is inconsistent with the encoding format of js. This article mainly teaches you a small way to solve such problems.
Solution:
Set both jsp page encoding and js encoding to utf-8
(1) Copy the content of the jsp page to a blank page, and then copy the jsp page The encoding is set to utf-8,
Then copy the content of the blank page to the modified encoded jsp page
(2) The encoding modification of js is the same as above (jsp page)
The problem is solved! ! !
Related recommendations:
javascript alert garbled solution_javascript skills
The above is the detailed content of Detailed explanation of js alert garbled problem. For more information, please follow other related articles on the PHP Chinese website!