天天看點

javascript 中文亂碼解決

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Cell Editing Grid Example</title>
    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" target="_blank" rel="external nofollow"  />
    <link rel="stylesheet" type="text/css" href="../shared/example.css" target="_blank" rel="external nofollow"  />
    <link rel="stylesheet" type="text/css" href="../ux/css/CheckHeader.css" target="_blank" rel="external nofollow"  />
    <script type="text/javascript" src="../../bootstrap.js" charset="gb2312"></script>
           
...
           

html 中 meta元素屬性:charset=utf-8。 在script中引入:charset="gb2312“, 便可解決亂碼了。