How to avoid garbled characters when importing external files (js/vbs/css)

How to avoid garbled characters when importing external files (js/vbs/css)
In the page, external files such as js, css, etc. are introduced. If the encoding of the external file is inconsistent with the current page file, garbled characters are likely to be generated, causing errors.

When importing external files, specifying the encoding of the target file can help avoid this problem.

Copy code
The code is as follows:

<script type="text/javascript" language="javascript" src="xxx.js" charset="GB2132"></script>

<<:  CSS3 implements missing corner rectangle, folded corner rectangle and missing corner border

>>:  Javascript destructuring assignment details

Recommend

Detailed tutorial on installing CentOS, JDK and Hadoop on VirtualBox

Table of contents 1. Prerequisites 1.1 Supported ...

Graphical tutorial on installing JDK1.8 under CentOS7.4

Linux installation JDK1.8 steps 1. Check whether ...

Vue implements zoom in, zoom out and drag function

This article example shares the specific code of ...

How to use nginx to intercept specified URL requests through regular expressions

nginx server nginx is an excellent web server tha...

After reading the introduction of CSS box model, you will not be confused

The property names often heard in web design: con...

MySQL 5.7.18 Archive compressed version installation tutorial

This article shares the specific method of instal...

Detailed explanation of Vue life cycle functions

Table of contents Lifecycle Functions Common life...

Solution for Docker Swarm external verification load balancing not taking effect

Problem Description I created three virtual machi...

Disadvantages and reasonable use of MySQL database index

Table of contents Proper use of indexes 1. Disadv...

How to deeply understand React's ref attribute

Table of contents Overview 1. Creation of Refs ob...

MySQL database table and database partitioning strategy

First, let's talk about why we need to divide...

Mysql Chinese sorting rules description

When using MySQL, we often sort and query a field...

Implementation of React configuration sub-routing

1. The component First.js has subcomponents: impo...