一个非常简单的函数上的无效或意外的令牌 [英] Invalid or unexpected token on a very simple function

查看:78
本文介绍了一个非常简单的函数上的无效或意外的令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里有什么问题:

$('#evclose').click(function(){
    console.log('323');
});​ // line 103

console:


Uncaught SyntaxError:无效或意外的令牌... commona.js103

Uncaught SyntaxError: Invalid or unexpected token... commona.js103

当我删除整个函数错误时没有出现。

when I delete the entire function error does not appear.

推荐答案

只是一个

Just a non-ascii-character \xe2 at the end of your function braces.

打开开发人员工具>控制台并粘贴你的代码。你会在那里看到一个红点,表示无效字符。

Open developer tool > console and paste your code. You will see a red dot over there which indicates an invalid character.

只需删除该无效字符(查看下图)。

Just remove that invalid character (check image below).

这篇关于一个非常简单的函数上的无效或意外的令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆