相关文章推荐
文雅的沙滩裤  ·  Navigator:canShare() ...·  2 月前    · 
有情有义的香烟  ·  创建和触发事件 - 事件参考 | MDN·  2 月前    · 
长情的豆腐  ·  410 Gone - HTTP | MDN·  2 月前    · 
爱搭讪的猴子  ·  print-color-adjust - ...·  1 月前    · 
爱运动的围巾  ·  浏览器的同源策略 - Web 安全 | MDN·  2 周前    · 
重感情的大象  ·  提高group_concat查询速度 - ...·  8 月前    · 
乐观的机器猫  ·  介绍4种HTML5 Canvas库 - ...·  9 月前    · 
腼腆的火柴  ·  电催化CO还原铜表面重构机制丨西湖大学人工光 ...·  10 月前    · 
苦闷的杯子  ·  react hooks深拷贝后无法保留视图状 ...·  1 年前    · 
呐喊的小蝌蚪  ·  指定类型的CompositionBatch. ...·  1 年前    · 
Code  ›  Window:focus() 方法 - Web API | MDN
web技术 mdn
https://developer.mozilla.org/zh-CN/docs/Web/API/Window/focus
慷慨大方的西装
8 月前
  • Skip to main content
  • Skip to search
  • Skip to select language
MDN Web Docs
  • 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

  • Plus
    • Overview

      A customized MDN experience

    • AI Help

      Get real-time assistance and support

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Curriculum
  • Blog
    • Playground

      Write, test and share your code

    • HTTP Observatory

      Scan a website for free

    • AI Help

      Get real-time assistance and support

  • Log in
  • Sign up for free
  1. 面向开发者的 Web 技术
  2. Web API
  3. Window
  4. Window:focus() 方法
    • English (US)
    • Français
    • 日本語

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

在本文中

  • 语法
  • 示例
  • 规范
  • 浏览器兼容性
  1. Window
  2. 实例属性
    1. caches
    2. closed
    3. console
    4. cookieStore
    5. credentialless
    6. crossOriginIsolated
    7. crypto
    8. customElements
    9. devicePixelRatio
    10. document
    11. documentPictureInPicture
    12. event
    13. external
    14. fence
    15. frameElement
    16. frames
    17. fullScreen
    18. history
    19. indexedDB
    20. innerHeight
    21. innerWidth
    22. isSecureContext
    23. launchQueue
    24. length
    25. localStorage
    26. location
    27. locationbar
    28. menubar
    29. mozInnerScreenX
    30. mozInnerScreenY
    31. name
    32. navigation
    33. navigator
    34. opener
    35. orientation
    36. origin
    37. originAgentCluster
    38. outerHeight
    39. outerWidth
    40. parent
    41. performance
    42. personalbar
    43. scheduler
    44. screen
    45. screenLeft
    46. screenTop
    47. screenX
    48. screenY
    49. scrollbars
    50. scrollMaxX
    51. scrollMaxY
    52. scrollX
    53. scrollY
    54. self
    55. sessionStorage
    56. sharedStorage
    57. speechSynthesis
    58. status
    59. statusbar
    60. toolbar
    61. top
    62. trustedTypes
    63. visualViewport
    64. window
  3. 实例方法
    1. alert()
    2. atob()
    3. back()
    4. blur()
    5. btoa()
    6. cancelAnimationFrame()
    7. cancelIdleCallback()
    8. captureEvents()
    9. clearImmediate()
    10. close()
    11. confirm()
    12. dump()
    13. fetch()
    14. find()
    15. focus()
    16. forward()
    17. getComputedStyle()
    18. getDefaultComputedStyle()
    19. getScreenDetails()
    20. getSelection()
    21. matchMedia()
    22. moveBy()
    23. moveTo()
    24. open()
    25. postMessage()
    26. print()
    27. prompt()
    28. queryLocalFonts()
    29. releaseEvents()
    30. requestAnimationFrame()
    31. requestFileSystem()
    32. requestIdleCallback()
    33. resizeBy()
    34. resizeTo()
    35. scroll()
    36. scrollBy()
    37. scrollByLines()
    38. scrollByPages()
    39. scrollTo()
    40. setImmediate()
    41. setResizable()
    42. showDirectoryPicker()
    43. showModalDialog()
    44. showOpenFilePicker()
    45. showSaveFilePicker()
    46. sizeToContent()
    47. stop()
    48. updateCommands()
    49. webkitConvertPointFromNodeToPage()
    50. webkitConvertPointFromPageToNode()
  4. 事件
    1. afterprint
    2. appinstalled
    3. beforeinstallprompt
    4. beforeprint
    5. beforeunload
    6. blur
    7. copy
    8. cut
    9. devicemotion
    10. deviceorientation
    11. deviceorientationabsolute
    12. error
    13. focus
    14. gamepadconnected
    15. gamepaddisconnected
    16. hashchange
    17. languagechange
    18. load
    19. message
    20. messageerror
    21. offline
    22. online
    23. orientationchange
    24. pagehide
    25. pagereveal
    26. pageshow
    27. pageswap
    28. paste
    29. popstate
    30. rejectionhandled
    31. resize
    32. storage
    33. unhandledrejection
    34. unload
    35. vrdisplayactivate
    36. vrdisplayconnect
    37. vrdisplaydeactivate
    38. vrdisplaydisconnect
    39. vrdisplaypresentchange
 
推荐文章
文雅的沙滩裤  ·  Navigator:canShare() 方法 - Web API | MDN
2 月前
有情有义的香烟  ·  创建和触发事件 - 事件参考 | MDN
2 月前
长情的豆腐  ·  410 Gone - HTTP | MDN
2 月前
爱搭讪的猴子  ·  print-color-adjust - CSS:层叠样式表 | MDN
1 月前
爱运动的围巾  ·  浏览器的同源策略 - Web 安全 | MDN
2 周前
重感情的大象  ·  提高group_concat查询速度 - CSDN文库
8 月前
乐观的机器猫  ·  介绍4种HTML5 Canvas库 - CSDN文库
9 月前
腼腆的火柴  ·  电催化CO还原铜表面重构机制丨西湖大学人工光合作用与太阳能燃料中心发表最新研究成果
10 月前
苦闷的杯子  ·  react hooks深拷贝后无法保留视图状态解决方法_React_脚本之家
1 年前
呐喊的小蝌蚪  ·  指定类型的CompositionBatch.AddExportedValue - 问答 - 腾讯云开发者社区-腾讯云
1 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号