Get the App
SLTechnology News&Howtos  ›  Development  › 

The solution to the random code of javascript pop-up box

Shulou Source: shulou.com Published: 2022-06-02 13:45:38 09月29日 Update

This article mainly introduces the solution of javascript pop-up box garbled, which is very detailed and has certain reference value. Friends who are interested must finish reading it!

Javascript pop-up box garbled solution: 1, add "charset=" utf-8 "" in the introduction code of js; 2, add "charset='utf-8'" code in head.

This article operating environment: windows7 system, javascript1.8.5 version, DELL G3 computer

Javascript pop-up window is the solution to garbled code:

1. Add charset= "utf-8" to the introduction code of js

Charset character set description, set to utf-8.

2. Add the following code between:

Garbled code:

It is called garbled when Chinese is read as unrecognizable characters.

The root cause of garbled code:

File in the save when there is an encoding format, only when saving the encoding format used to read the same as the format used to read the file; for example, UTF-8 encoding, GBK encoding can read Chinese, then if you use UTF-8 encoding to save the file, but using GBK encoding to read the file will cause garbled, so UTF-8 encoding saved files should be read using UTF-8 encoding.

The encoding format of the file includes: UTF-8 encoding, GBK encoding, ANSI encoding, GB2312 encoding.

The above is all the content of this article "the solution to the garbled code of javascript pop-up box". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Coding garbled file UTF-8 code format method content character article utf-8 Chinese plus Chinese same between value interest method reason only Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia OPPO Reno Microsoft MariaDB Huawei