Uncaught SyntaxError: Unexpected end of input 错误

简介:

Unexpected end of input  的英文意思是“意外的终止输入

他表示我们浏览器在读取我们的代码时,碰到了不可预知的错误,导致浏览器 无语进行下面的读取

通常造成这种错误的原因是应该成双的符号输入错误,比如说“”,‘’,{},[]。

如果你出现这种错误,你就要找你的代码中是不是以上结构有开始,但没有结束,重点查找你的js代码。

你一个一个对比总能找到你的错误。如果没有发现,你就要想想,是不是你的代码中有转义字符,并且这些转义字符你没有处理正确。




     本文转自潜心笃志 51CTO博客,原文链接:http://blog.51cto.com/82711020/1983398,如需转载请自行联系原作者


相关文章
|
3月前
|
Python
完美解决丨 - [SyntaxError: invalid syntax](#SyntaxError-invalid-syntax)
完美解决丨 - [SyntaxError: invalid syntax](#SyntaxError-invalid-syntax)
|
3月前
|
Python
完美解决丨SyntaxError: invalid syntax
完美解决丨SyntaxError: invalid syntax
|
10月前
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
93 0
|
10月前
|
关系型数据库 MySQL C++
Error:fatal error C1010: unexpected end of file while looking for precompiled head
Error:fatal error C1010: unexpected end of file while looking for precompiled head
84 0
|
11月前
|
机器学习/深度学习 Windows
raise RuntimeError(‘Error(s) in loading state_dict for {}:\n\t{}‘.format( RuntimeError: Error(s)..报错
即load_state_dict(fsd,strict=False) 属性strict;当strict=True,要求预训练练权重层数的键值与新构建的模型中的权重层数名称完全吻合;
1163 0
|
Dart 前端开发 JavaScript
Syntax Error: TypeError: this.getOptions is not a function
Syntax Error: TypeError: this.getOptions is not a function
453 0
Syntax Error: TypeError: this.getOptions is not a function
|
C语言
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
error: implicit declaration of function ‘VerifyFixClassname‘ is invalid in C99 [-Werror,-Wimplicit-f
111 0
|
XML JSON 前端开发
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)
195 0
ajaxfileupload上传文件和报错syntaxerror: Unexpected end of input(…)
|
Python
SyntaxError: Missing parentheses in call to 'print'
SyntaxError: Missing parentheses in call to 'print'
107 0
|
JavaScript
Uncaught SyntaxError: Unexpected token <
Uncaught SyntaxError: Unexpected token <
549 0
Uncaught SyntaxError: Unexpected token <