DOM对象转换成jquery对象

var box = document.getElementById('box');
console.log($(box));

jquery对象转化成DOM对象

第一种方式:

$('button')[0]

第二种方式:

$('button').get(0)

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-08-30
  • 2021-11-28
  • 2021-07-11
  • 2021-05-28
  • 2021-08-01
猜你喜欢
  • 2021-12-10
  • 2021-06-09
  • 2022-12-23
  • 2021-07-02
  • 2022-02-01
  • 2021-12-24
相关资源
相似解决方案