When JavaScript is introduced, the Alert pop-up box shows Chinese garbled problem.

Today, in HTML is introduced into the JavaScript file, Alert pop-up prompt box in Chinese is displayed as garbled.

引入JavaScript时alert弹出框显示中文乱码问题 There are two possibilities:

JavaScript is not the same as the HTML file encoding

Method: Specifying its character set in the code that introduces JavaScript, the code is as follows:

   2.HTML encoding method does not support display Chinese   approach: Add a 
tab to
, specifying the HTML encoding format UTF-8, the code is as follows:

Summary

is small When you introduce you to introduce JavaScript, the Alert pop-up box shows Chinese garbled, I hope to help everyone!
                    
© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment