No visible cause for “Unexpected token ILLEGAL”

后端 未结 11 2236
轻奢々
轻奢々 2020-11-22 00:09

I\'m getting this JavaScript error on my console:

Uncaught SyntaxError: Unexpected token ILLEGAL

This is my code:

11条回答
  •  一向
    一向 (楼主)
    2020-11-22 00:47

    Here is my reason:

    before:

    var path = "D:\xxx\util.s"
    

    which \u is a escape, I figured it out by using Codepen's analyze JS.

    after:

    var path = "D:\\xxx\\util.s"
    

    and the error fixed

提交回复
热议问题