Uncaught SyntaxError:意外的令牌非法-仅在我的文件上 [英] Uncaught SyntaxError: Unexpected token ILLEGAL - only on my file

查看:114
本文介绍了Uncaught SyntaxError:意外的令牌非法-仅在我的文件上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

未捕获到的SyntaxError:意外令牌ILLEGAL

Uncaught SyntaxError: Unexpected token ILLEGAL

有人可以帮忙吗?

推荐答案

在script.js的结尾处有一个看不见的坏字符,可能是因为您从jsfiddle复制了一些代码.

You have an invisible bad character at the end of script.js, probably because you copied some code from jsfiddle.

使用您喜欢的编辑器将其删除:移至script.js文件的末尾并使用Backspace键:由于删除的字符为U + 200B,您会一次看到光标移至同一空间,零宽度空间.

Remove it with your favorite editor : go at the end of the script.js file and use the backspace key : you'll see your cursor remove at the same space at one time because the char you remove is U+200B, the zero width space.

此问题是由于其脚本编辑器的错误所致,可能是这一个.

This problem is due to a bug of their script editor, probably this one.

这篇关于Uncaught SyntaxError:意外的令牌非法-仅在我的文件上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆