• Skip to main content
  • Skip to search
  • Skip to select language
MDN Logo
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. Window
  4. Window.blur()
  • Change language

Table of contents

  • Syntax
  • Example
  • Notes
  • Specifications
  • Browser compatibility

Window.blur()

Shifts focus away from the window.

Syntax

window.blur()

Example

window.blur();

Notes

The window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.

Specifications

Specification
HTML Standard
# dom-window-blur

Browser compatibility

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Sep 14, 2021, by MDN contributors

Change your language

Related Topics

  1. Window
  2. Properties
    1. applicationCache
    2. closed
    3. console
    4. customElements
    5. defaultStatus
    6. devicePixelRatio
    7. dialogArguments
    8. document
    9. event
    10. frameElement
    11. frames
    12. fullScreen
    13. history
    14. innerHeight
    15. innerWidth
    16. length
    17. localStorage
    18. location
    19. locationbar
    20. menubar
    21. mozInnerScreenX
    22. mozInnerScreenY
    23. mozPaintCount
    24. name
    25. navigator
    26. ondragdrop
    27. opener
    28. outerHeight
    29. outerWidth
    30. pageXOffset
    31. pageYOffset
    32. parent
    33. personalbar
    34. screen
    35. screenLeft
    36. screenTop
    37. screenX
    38. screenY
    39. scrollbars
    40. scrollMaxX
    41. scrollMaxY
    42. scrollX
    43. scrollY
    44. self
    45. sessionStorage
    46. sidebar
    47. speechSynthesis
    48. status
    49. statusbar
    50. toolbar
    51. top
    52. visualViewport
    53. window
  3. Methods
    1. alert()
    2. back()
    3. blur()
    4. cancelAnimationFrame()
    5. cancelIdleCallback()
    6. captureEvents()
    7. clearImmediate()
    8. close()
    9. confirm()
    10. convertPointFromNodeToPage()
    11. convertPointFromPageToNode
    12. dump()
    13. find()
    14. focus()
    15. forward()
    16. getComputedStyle()
    17. getDefaultComputedStyle()
    18. getSelection()
    19. matchMedia()
    20. moveBy()
    21. moveTo()
    22. open()
    23. openDialog()
    24. postMessage()
    25. print()
    26. prompt()
    27. releaseEvents()
    28. requestAnimationFrame()
    29. requestFileSystem()
    30. requestIdleCallback()
    31. resizeBy()
    32. resizeTo()
    33. scroll()
    34. scrollBy()
    35. scrollByLines()
    36. scrollByPages()
    37. scrollTo()
    38. setImmediate()
    39. showDirectoryPicker()
    40. showModalDialog()
    41. showOpenFilePicker()
    42. showSaveFilePicker()
    43. sizeToContent()
    44. stop()
    45. updateCommands()
  4. Events
    1. event
    2. afterprint
    3. animationcancel
    4. animationend
    5. animationiteration
    6. beforeinstallprompt
    7. beforeprint
    8. beforeunload
    9. blur
    10. copy
    11. cut
    12. deviceorientationabsolute
    13. DOMContentLoaded
    14. error
    15. focus
    16. gamepadconnected
    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. storage
    31. transitioncancel
    32. unhandledrejection
    33. unload
    34. vrdisplayactivate
    35. vrdisplayblur
    36. vrdisplayconnect
    37. vrdisplaydeactivate
    38. vrdisplaydisconnect
    39. vrdisplayfocus
    40. vrdisplaypointerrestricted
    41. vrdisplaypointerunrestricted
    42. vrdisplaypresentchange
  5. Inheritance:
    1. EventTarget
MDN Logo
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2025 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies