請(qǐng)問大神這段代碼錯(cuò)在哪里?為什么用chrome瀏覽器打開后,顯示亂碼?
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html"charset=gb2312">
<title>盒子模型--寬度和高度</title>
<style type="text/css">
div{
width: 200px;
padding: 20px;
border: 1px solid red;
margin: 10px; ?
}
</style>
</head>
<body>
<div>文本內(nèi)容</div>
</body>
</html>
請(qǐng)問大神這段代碼錯(cuò)在哪里?為什么用chrome瀏覽器打開后,顯示亂碼?
2016-10-18
代碼中 charset=gb2312" 這個(gè)是有問題的
改成:charset="uft-8" 就能正確顯示了
一般瀏覽器打開亂碼的話,應(yīng)該就是默認(rèn)編碼未設(shè)置utf-8的問題了
2016-10-18
第四行charset前面的雙引號(hào)改為分號(hào)啊大哥
2016-10-18
語法有誤,重新書寫,測(cè)試沒有亂碼
2016-10-18
ext/html后面的是; 而不是" ?
編碼是utf-8而不是gb2312
2016-10-18
我在慕課網(wǎng)上運(yùn)行了一下是沒錯(cuò)的,你把charset=gb2312改成UTF-8然后在chome中試一試。
2016-10-18
charset這里錯(cuò)了,應(yīng)該是charset="utf-8"