Home  >  Article  >  Web Front-end  >  Detailed explanation of js alert garbled problem

Detailed explanation of js alert garbled problem

小云云
小云云Original
2018-03-13 15:24:491636browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn