HTML显示乱码问题
在head添加:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
如果还不行,将utf-8改为gb2312
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>Document</title> </head> <script> var name=prompt("请在键盘输入名字:"); console.log(name); alert(name); </script> <body> <h1>标题</h1> <p>这是一段测试文本!</p> </body> </html>

浙公网安备 33010602011771号