[Solved] Uncaught SyntaxError: Invalid Unicode escape sequence

Page error encountered today: Uncaught SyntaxError: Invalid Unicode escape sequence

The parameter in the button click method is a software path, and an error will be reported when passing the parameter. The main reason is that the backslash in JS is caused by the escape character

So just replace the backslash with a double slash to solve the problem: replace(/\\/g,”/”)

Read More: