今天在页面中导入一个js文件,然后老是报“未结束的字符串”,还有导入的js文件中的一个变量老是说没定义,
后来发现是编码问题,只要把js文件另存为utf-8编码格式就可以了。

又或者在导入时指定charset:
<script   language="javascript"   src="js/xxx.js"   type="text/javascript"   chartset="gb2312"></script>

相关文章:

  • 2022-12-23
  • 2021-07-17
  • 2021-09-23
  • 2021-07-11
  • 2022-12-23
  • 2021-09-03
  • 2021-08-07
猜你喜欢
  • 2021-10-17
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案