Uncaught SyntaxError: Unexpected token ILLEGAL

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.****.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

Uncaught SyntaxError: Unexpected token ILLEGAL

未捕获的语法错误 意想不到非法令牌

Uncaught SyntaxError: Unexpected token ILLEGAL

<input id="btn_0_4EAE4F474C91156086C0D4EA7E983C69C215B649" type="button" value="连接" onclick="middleware_connect(0, 4EAE4F474C91156086C0D4EA7E983C69C215B649)">


经过查看源码可以发现“onclick="middleware_connect(0, 4EAE4F474C91156086C0D4EA7E983C69C215B649)"”,第二个参数是字符串,却没有使用引号括起来,所以引发了此异常。


加上引号后,问题解决:

<input id="btn_0_4EAE4F474C91156086C0D4EA7E983C69C215B649" type="button" value="连接" onclick="middleware_connect('0', '4EAE4F474C91156086C0D4EA7E983C69C215B649')">


Uncaught SyntaxError: Unexpected token ILLEGAL


           

给我老师的人工智能教程打call!http://blog.****.net/jiangjunshow

Uncaught SyntaxError: Unexpected token ILLEGAL