[TOC]
# 注釋
~~~
<!-- not good! -->
<!--這里是注釋 -這里是注釋-->
<!-- -這里是注釋 -這里是注釋 --->
<!-- very good! -->
<!--這里是注釋============這里是注釋-->
<!--這里是注釋-->
<!-- [if IE]>
這里只有ie瀏覽器才可以顯示
<![endif]-->
<!-- [if !IE]>
這里只有非ie瀏覽器才可以顯示
<! <![endif]-->
<!--[if IE 6]>
這里只有ie6瀏覽器才可以顯示
<![endif]-->
<!--[if lt IE 9]>
這里只有ie9以下瀏覽器才可以顯示
<![endif]-->
<!--[if lte IE 8]>
這里只有ie8以及ie8以下瀏覽器才可以顯示
<![endif]-->
~~~
# JS中文轉unicode
為防止外鏈腳本未申明正確編碼導致亂碼的問題,腳本中如用到中文,必須轉為unicode碼
~~~
/* 不推薦 */
document.write("關于騰訊游戲")
/* 推薦 */
document.write("\u5173\u4e8e\u817e\u8baf\u6e38\u620f")
~~~
對“<”“>”之類的符號進行實體轉義
~~~
<!--不推薦-->
<a href="/wiki/">more>></a>
<!--推薦-->
<a href="/wiki/">more>></a>
~~~
**推薦sublime text3 使用插件:ConvertChineseCharacters**
``https://github.com/stormtea123/ConvertChineseCharacters``
**在線中文轉Unicode**
>http://tool.chinaz.com/tools/unicode.aspx