Webstorm上运行html文件Chrome浏览器显示出现乱码解决方法
现象:举个例子
Webstorm运行html时,Chrome浏览器显示出现乱码,如图所示:
<html>
<head>
<title>网页的标题yes</title>
</head>
<body>
网页的主体内容
</body>
</html>

解决方法:
代码前面加上一行<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
即:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<html>
<head>
<title>网页的标题yes</title>
</head>
<body>
网页的主体内容
</body>
</html>

成功!
本文来自博客园,作者:JaxonYe,转载请注明原文链接:https://www.cnblogs.com/yechangxin/articles/16342663.html
侵权必究

浙公网安备 33010602011771号