• 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. Tecnología para desarrolladores web
  2. Referencia de la API Web
  3. Selection
  4. collapseToEnd

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

  1. Document Object Model
  2. Selection
  3. Propiedades de instancia
    1. anchorNode
    2. anchorOffset
    3. focusNode
    4. focusOffset
    5. isCollapsed
    6. rangeCount
    7. type (en-US)
  4. Métodos de instancia
    1. addRange()
    2. collapse()
    3. collapseToEnd()
    4. collapseToStart()
    5. containsNode()
    6. deleteFromDocument()
    7. empty() (en-US)
    8. extend()
    9. getRangeAt()
    10. modify() (en-US)
    11. removeAllRanges()
    12. removeRange()
    13. selectAllChildren()
    14. setBaseAndExtent() (en-US)
    15. setPosition() (en-US)
    16. toString()
  5. Páginas relacionadas a DOM
    1. AbortController (en-US)
    2. AbortSignal (en-US)
    3. AbstractRange (en-US)
    4. Attr
    5. CDATASection (en-US)
    6. CharacterData (en-US)
    7. Comment
    8. CustomEvent
    9. DOMError
    10. DOMException
    11. DOMImplementation (en-US)
    12. DOMParser
    13. DOMPoint (en-US)
    14. DOMPointReadOnly (en-US)
    15. DOMRect (en-US)
    16. DOMTokenList (en-US)
    17. Document
    18. DocumentFragment
    19. DocumentType (en-US)
    20. Element
    21. Event
    22. EventTarget
    23. HTMLCollection
    24. MutationObserver
    25. MutationRecord (en-US)
    26. NamedNodeMap (en-US)
    27. Node
    28. NodeIterator (en-US)
    29. NodeList
    30. ProcessingInstruction (en-US)
    31. Range
    32. StaticRange (en-US)
    33. Text (en-US)
    34. TextDecoder (en-US)
    35. TextEncoder (en-US)
    36. TimeRanges (en-US)
    37. TreeWalker (en-US)
    38. XMLDocument

collapseToEnd

Resumen

Traslada el ancla hasta el mismo punto del foco. El foco no se mueve. Si el contenido es enfocado y editable, el cursor parpadeará ahí.

Sintaxis

sel.collapseToEnd()

Parámetros

Ninguno.

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 1 dic 2022 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.