语法错误:属性列表后缺少 }
当 对象初始值设定项 语法中某处出现错误时,就会发生 JavaScript 异常 "属性列表后缺少 }"。实际上可能是缺少大括号,但也可能是缺少逗号。
¥The JavaScript exception "missing } after property list" occurs when there is a mistake in the object initializer syntax somewhere. Might be in fact a missing curly bracket, but could also be a missing comma.
信息
错误类型
什么地方出了错?
¥What went wrong?
对象初始值设定项 语法中某处有错误。实际上可能是缺少大括号,但也可能是缺少逗号。还要检查任何右大括号或圆括号的顺序是否正确。更好地缩进或格式化代码也可能会帮助你看清丛林。
¥There is a mistake in the object initializer syntax somewhere. Might be in fact a missing curly bracket, but could also be a missing comma, for example. Also check if any closing curly braces or parenthesis are in the correct order. Indenting or formatting the code a bit nicer might also help you to see through the jungle.
示例
忘记逗号
也可以看看
¥See also