html乱码原因与网页与网页乱码解决方法

来源:互联网 发布:阿里算法 编辑:程序博客网 时间:2024/06/04 06:05

第一种,html网页源代码编码与中文字输入编码不同。

解决方法:

使用软件进行编辑HTML网页内容,推荐使用DW软件进行HTML代码编辑和开发。

尽量不要直接使用记事本进行编辑HTML代码。

在相应的html页面<head></head>头之间写上

<span style="color:#333333;"><meta </span><span style="color:#ff0000;">http-equiv</span><span style="color:#333333;">="content-Type" content="text/html;charset=utf-8"></span>
这里的http-equiv不能写成为name,Myeclipse自动生成的是name,会造成乱码的问题。



0 0
原创粉丝点击