本文介绍了Internet Explorer错误:“预期标识符”和“预期对象”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好我在IE中加载任何js文件时会出现此错误我该怎么办?
网页错误详情
Hello I am getting this error in IE when i load any js file what should I do?Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET CLR 1.1.4322)
Timestamp: Tue, 1 Mar 2011 18:34:03 UTC
Message: Expected identifier
Line: 26
Char: 21
Code: 0
URI: http://localhost/learning/public/js/general.js
Message: Object expected
Line: 5
Char: 3
Code: 0
URI: http://localhost/learning/public/js/tests.js
推荐答案
可能是@gddc说的,有一个尾随逗号的问题,或者错误来自于使用。当资源管理器看到变量名称,如 super
, class
和 exports
它会在评估代码之前剥离它们。
It is likely either as @g.d.d.c says, a problem with a trailing comma, or the error comes from using reserved key words. When Explorer sees variable names like super
, class
and exports
it will strip those away before evaluating the code.
class = 'asdf';
...变成......
… becomes …
= 'asdf';
因此没有标识符来指定'asdf'
字符串到。
And thus there is no identifier to assign the 'asdf'
string to.
这篇关于Internet Explorer错误:“预期标识符”和“预期对象”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!