function getScrollOffset() {
 if (window.pageXOffset) {
 return {
 x: window.pageXOffset,
 y: window.pageYOffset
 }
 } else {
 return {
 x: document.body.scrollLeft + document.documentElement.scrollLeft,
 y: document.body.scrollTop + document.documentElement.scrollTop
 }
 }
}

 

相关文章:

  • 2021-12-23
  • 2021-12-23
  • 2021-08-19
  • 2022-12-23
  • 2021-12-23
  • 2018-03-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
  • 2021-11-17
  • 2022-01-02
  • 2021-12-23
相关资源
相似解决方案