【发布时间】:2012-01-21 14:33:11
【问题描述】:
我正在做一个网络应用程序,当我开始用 JavaScript 编写代码时,我收到了这个错误:
Syntax error: unexpected token "-" javascript
我正在使用 Aptana Studio 3。我认为这是 Aptana 的问题,所以我尝试使用 Eclipse,但仍然遇到同样的错误。 Eclipse 向我显示了这个错误:
Cannot return from outside a function or method.
这是我的功能:
function www_ebest_eu_company_node_service_task-slot-info () {
this.typeMarker = 'www_ebest_eu_company_node_service_task-slot-info';
this._endDateTime = null;
this._number = null;
this._orderId = null;
this._startDateTime = null;
this._taskId = null;
this._taskStatus = null;
}
我有很多这样的函数,但对于每个函数,我都会遇到相同的错误。
有人遇到同样的问题吗?
【问题讨论】: