How to set charset=“utf-8” in the javascript file itself

前端 未结 2 771
你的背包
你的背包 2021-01-04 07:50

I am trying to set charset=\"utf-8\" inside the javascript file itself, not in the script tag, I know that I can do this:



        
2条回答
  •  我在风中等你
    2021-01-04 08:33

    I think you can't set this in the Javascript file itself. The browser need the charset to read the file. So without the charset the browser is not able to understand your file and therefore would not be able to read the charset definition

提交回复
热议问题