• Skip to main content
  • Skip to search
  • Skip to select language
webdocs.dev
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Extensions

      Developing extensions for web browsers

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • Play New
  1. Web 开发技术
  2. Web API 接口参考
  3. Window
  4. Window.pageXOffset

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

In this article

  • 规范
  • 浏览器兼容性
  • 相关链接
  1. Window
  2. 实例属性
    1. applicationCache 非标准 已弃用
    2. closed
    3. console
    4. credentialless (en-US) 实验性 非标准
    5. customElements
    6. defaultStatus 已弃用
    7. devicePixelRatio
    8. document
    9. event 已弃用
    10. external 已弃用
    11. frameElement
    12. frames
    13. fullScreen 非标准
    14. history
    15. innerHeight
    16. innerWidth
    17. launchQueue (en-US) 实验性
    18. length
    19. localStorage
    20. location
    21. locationbar
    22. menubar
    23. mozInnerScreenX 非标准
    24. mozInnerScreenY 非标准
    25. name
    26. navigation (en-US) 实验性
    27. navigator
    28. ondragdrop 已弃用
    29. opener
    30. orientation (en-US) 已弃用
    31. outerHeight
    32. outerWidth
    33. pageXOffset
    34. pageYOffset
    35. parent
    36. personalbar
    37. scheduler (en-US)
    38. screen
    39. screenLeft
    40. screenTop
    41. screenX
    42. screenY
    43. scrollbars
    44. scrollMaxX 非标准
    45. scrollMaxY 非标准
    46. scrollX
    47. scrollY
    48. self
    49. sessionStorage
    50. sidebar 非标准 已弃用
    51. speechSynthesis (en-US)
    52. status (en-US) 已弃用
    53. statusbar (en-US)
    54. toolbar (en-US)
    55. top
    56. visualViewport
    57. window
  3. 实例方法
    1. alert()
    2. back() 非标准 已弃用
    3. blur()
    4. cancelAnimationFrame()
    5. cancelIdleCallback()
    6. captureEvents() (en-US) 已弃用
    7. clearImmediate()
    8. close()
    9. confirm()
    10. convertPointFromNodeToPage() (en-US) 非标准
    11. dump() 非标准
    12. find() 非标准
    13. focus()
    14. forward() (en-US) 非标准 已弃用
    15. getComputedStyle()
    16. getDefaultComputedStyle() 非标准
    17. getSelection()
    18. matchMedia()
    19. moveBy()
    20. moveTo()
    21. open()
    22. postMessage()
    23. print()
    24. prompt()
    25. queryLocalFonts() (en-US) 实验性
    26. releaseEvents() (en-US) 已弃用
    27. requestAnimationFrame()
    28. requestFileSystem() 非标准 已弃用
    29. requestIdleCallback()
    30. resizeBy()
    31. resizeTo()
    32. scroll()
    33. scrollBy()
    34. scrollByLines() 非标准
    35. scrollByPages() 非标准
    36. scrollTo()
    37. setImmediate()
    38. showDirectoryPicker() 实验性
    39. showModalDialog() 非标准 已弃用
    40. showOpenFilePicker() 实验性
    41. showSaveFilePicker() 实验性
    42. sizeToContent() 非标准
    43. stop()
    44. updateCommands() 非标准
    45. webkitConvertPointFromPageToNode() (en-US) 非标准 已弃用
  4. 事件
    1. afterprint
    2. appinstalled
    3. beforeinstallprompt
    4. beforeprint
    5. beforeunload
    6. blur
    7. copy
    8. cut
    9. devicemotion
    10. deviceorientation
    11. deviceorientationabsolute
    12. DOMContentLoaded
    13. error
    14. focus
    15. gamepadconnected
    16. gamepaddisconnected
    17. hashchange
    18. languagechange
    19. load
    20. message
    21. messageerror
    22. offline
    23. online
    24. orientationchange 已弃用
    25. pagehide
    26. pageshow
    27. paste
    28. popstate
    29. rejectionhandled
    30. resize
    31. storage
    32. unhandledrejection
    33. unload
    34. vrdisplayactivate (en-US) 非标准 已弃用
    35. vrdisplayconnect (en-US) 非标准 已弃用
    36. vrdisplaydeactivate (en-US) 非标准 已弃用
    37. vrdisplaydisconnect (en-US) 非标准 已弃用
    38. vrdisplaypresentchange (en-US) 非标准 已弃用
  5. 继承
    1. EventTarget

In this article

  • 规范
  • 浏览器兼容性
  • 相关链接

Window.pageXOffset

这是 scrollX 的别名

规范

Specification
CSSOM View Module
# dom-window-pagexoffset

浏览器兼容性

BCD tables only load in the browser

相关链接

  • window.pageYOffset

Found a content problem with this page?

  • Edit the page on GitHub.
  • Report the content issue.
  • View the source on GitHub.
Want to get more involved? Learn how to contribute.

This page was last modified on 2022年9月21日 by MDN contributors.

webdocs.dev
  • GitHub

Support

  • Report an issue

Our communities

  • Discord

Developers

  • Web Technologies
  • Learn Web Development

Portions of this content are ©1998–2023 by individual contributors. Content available under a Creative Commons license.