小编Tot*_*oro的帖子

语法错误:意外令牌" - "

我正在做一个Web应用程序,当我开始用JavaScript编写代码时,我收到了这个错误:

Syntax error: unexpected token "-"  javascript 
Run Code Online (Sandbox Code Playgroud)

我正在使用Aptana Studio 3.我认为这是Aptana的问题,所以我尝试使用Eclipse,但仍然遇到了同样的错误.Eclipse向我显示了这个错误:

Cannot return from outside a function or method.
Run Code Online (Sandbox Code Playgroud)

这是我的功能:

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;
}
Run Code Online (Sandbox Code Playgroud)

我有很多这样的功能,对于每一个我都得到同样的错误.

有没有人有同样的问题?

javascript syntax-error

4
推荐指数
2
解决办法
3479
查看次数

标签 统计

javascript ×1

syntax-error ×1