js报错 Uncaught SyntaxError: Unexpected end of input

原因:输入的意外终止……

    页面代码写的不规范啊……其中的某条语句,没有正常结束……

    或者部分语句“‘’”双引号,单引号没有配对好,被转义了之类的……错误造成的

代码:  

<script type="text/javascript">
$(function(){
$('#name1').prop('checked',false);
console.log(str);
</script>

修改后:

<script type="text/javascript">
$(function(){
$('#name1').prop('checked',false);
console.log(str);
}); //少了这个结束符
</script>

 

相关文章:

  • 2022-12-23
  • 2021-12-08
  • 2021-12-10
  • 2022-12-23
  • 2021-03-30
  • 2021-10-18
  • 2021-09-02
  • 2021-04-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-12-22
  • 2022-12-23
相关资源
相似解决方案