Home >Web Front-end >JS Tutorial >Solving encoding problems of javascript documents_javascript skills
Therefore, when referencing a js document, you need to set the encoding of the referenced document.
For example: if a utf-8 page refers to a gb2312 js document, then it should be written like this
This way there will be no problems.