Tag: pnotify

未捕获的SyntaxError:Google Chrome中的意外令牌=

我有一个接受可选参数的javascript函数。 这在Firefox运行良好,但在Google Chrome显示: – Uncaught SyntaxError: Unexpected token = 我的代码, function errorNotification(text = “Something went wrong!”) { $.pnotify({ title: ‘Error’, text: text, type: ‘error’ }); } 我见过很多类似的问题,但我无法实现我的问题。