简体   繁体   English

jQuery函数执行但记录错误

[英]jquery functions execute but log an error

When I execute the following function: 当我执行以下功能时:

<span onclick="ldmr()">load more</span>     
<script type="text/javascript">
  function ldmr() 
  {  
    alert("hhhhhh");  
  }
</script>

I get this error: 我收到此错误:

Uncaught Error: Syntax error, unrecognized expression: #
at Function.ga.error (jquery-3.2.1.min.js:2)
at ga.tokenize (jquery-3.2.1.min.js:2)
at ga.select (jquery-3.2.1.min.js:2)
at Function.ga [as find] (jquery-3.2.1.min.js:2)
at r.fn.init.find (jquery-3.2.1.min.js:2)
at new r.fn.init (jquery-3.2.1.min.js:2)
at r (jquery-3.2.1.min.js:2)
at i (bootstrap.min.js:6)
at HTMLAnchorElement.<anonymous> (bootstrap.min.js:6)
at Function.each (jquery-3.2.1.min.js:2)

Could you please explain me what is the reason of this error? 您能否解释一下此错误的原因是什么? Thanks. 谢谢。

The bootstrap js lib i was using is depricated i just used a new version and the error gone 我正在使用的bootstrap js lib被描述为我刚刚使用了新版本,并且错误消失了

Thanks 谢谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM