UTF-8为例: 方案1: 将js文件转为utf-8格式存储 方案2: <script type="text/javascript" src="scripts/output.js" charset="gb2312">