您的位置:首页 > Web前端 > HTML5

如何解决html5开发中常见的中文乱码问题

2014-08-12 23:57 393 查看
哈,就是使用<meta charset="gbk"/>或<metacharset="gb2312"/>

代码示例:

<!DOCTYPE html>

<html>

<head>

<meta charset="gb2312"/>

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css">

<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>

<script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script>

</head>

<body>

<div data-role="page" id="pageone">

<div data-role="header">

<h1>中文</h1>

</div>

<div data-role="content">

<p>insert</p>

</div>

<div data-role="footer">

<h1>insert</h1>

</div>

</div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: