困扰我一天的问题,终于知道原因了:

js方法不能与jquery方法同时用!!!
度娘找到了答案:例如

attr("name") 是jquery对象的方法,原生js的方法是getAttribute()。

代码可以写成$(element).attr("name")或者element.getAttribute("name")。

 

相关文章:

  • 2022-01-30
  • 2022-12-23
  • 2021-09-12
  • 2021-08-01
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2021-12-10
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
相关资源
相似解决方案