Uncaught SyntaxError: Unexpected token ILLEGAL

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

Uncaught SyntaxError: Unexpected token ILLEGAL_字符串

 

[html]  view plain copy Uncaught SyntaxError: Unexpected token ILLEGAL_html_02 Uncaught SyntaxError: Unexpected token ILLEGAL_3c_03
 
  1. <input id="btn_0_4EAE4F474C91156086C0D4EA7E983C69C215B649" type="button" value="连接" onclick="middleware_connect(0, 4EAE4F474C91156086C0D4EA7E983C69C215B649)">  



 

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

 

加上引号后,问题解决:

 

[html]  view plain copy Uncaught SyntaxError: Unexpected token ILLEGAL_html_02 Uncaught SyntaxError: Unexpected token ILLEGAL_3c_03
 
  1. <input id="btn_0_4EAE4F474C91156086C0D4EA7E983C69C215B649" type="button" value="连接" onclick="middleware_connect('0', '4EAE4F474C91156086C0D4EA7E983