最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - SyntaxError:" identifier starts immediately after numeric literal" - Stack Overflow

programmeradmin0浏览0评论

I'm getting that error being reported in firebug:

data = data + "&network=" + rowdatawork + "&10xx=" + rowdata.10xx;

can anyone help me how to fix this error.

I'm getting that error being reported in firebug:

data = data + "&network=" + rowdatawork + "&10xx=" + rowdata.10xx;

can anyone help me how to fix this error.

Share Improve this question edited Jun 28, 2013 at 6:18 vstm 12.5k1 gold badge52 silver badges47 bronze badges asked Jun 28, 2013 at 6:14 arokiaarokia 251 silver badge9 bronze badges 1
  • 2 error being reported due to rowdata.10xx. This is not a valid JS. – som Commented Jun 28, 2013 at 6:17
Add a ment  | 

1 Answer 1

Reset to default 4

rowdata.10xx is invalid JS. Dot notation access of properties uses identifiers and identifiers cannot start with a number. Either use a different property name:

rowdata.x10xx

or use square bracket notation, which lets you use strings instead of identifiers:

rowdata['10xx']
发布评论

评论列表(0)

  1. 暂无评论