http://www.w3cpro.cn/article/javascript/185.html 是我看到讲的比较清楚易懂的一篇,对我这种初学者很有帮助。

补充一下
如果网页头声明的类型是
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,那么document.body.scrollLeft和document.body.clientLeft 总为零。解决的办法是把document.body改为document.documentElement。

相关文章:

  • 2021-10-16
  • 2022-12-23
  • 2022-02-16
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-31
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案