Today, after using the <script> tag to reference the js file in the jsp page, Chinese garbled characters were found when the web page tested the source code:
After some searching online, I went straight to the most brute force method. (Because there is a high probability that other methods cannot be changed, it is recommended to use violence to solve it directly, which is also very fast), the specific method is as follows:
Step1: Open the js file with Notepad, save it as a file with the encoding format "UTF-8 with BOM", and change the file name slightly
Step2: Delete the original file and change the changed file name back to the original file name
success!