• 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

  • MDN Plus
    • Overview

      A customized MDN experience

    • Updates

      All browser compatibility updates at a glance

    • Documentation

      Learn how to use MDN Plus

    • FAQ

      Frequently asked questions about MDN Plus

  • Log in
  • Get MDN Plus
  1. Technologies web pour développeurs
  2. Référence Web API
  3. Document
  4. Document.URL

Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez également contribuer en rejoignant la communauté francophone sur MDN Web Docs.

In this article

  • Syntaxe
  • Exemple
  • Specification
  1. Document Object Model
  2. Document
  3. Constructeur
    1. Document()
  4. Propriétés d'instance
    1. activeElement
    2. adoptedStyleSheets (en-US)
    3. alinkColor Obsolète
    4. all (en-US) Obsolète
    5. anchors Obsolète
    6. applets Obsolète
    7. bgColor Obsolète
    8. body
    9. characterSet
    10. childElementCount (en-US)
    11. children (en-US)
    12. compatMode
    13. contentType
    14. cookie (en-US)
    15. currentScript
    16. defaultView
    17. designMode
    18. dir
    19. doctype
    20. documentElement
    21. documentURI
    22. domain Obsolète
    23. embeds (en-US)
    24. featurePolicy Expérimental
    25. fgColor (en-US) Obsolète
    26. firstElementChild (en-US)
    27. fonts (en-US)
    28. forms
    29. fragmentDirective (en-US) Expérimental
    30. fullscreen (en-US) Obsolète
    31. fullscreenElement (en-US)
    32. fullscreenEnabled (en-US)
    33. head
    34. hidden
    35. images
    36. implementation
    37. lastElementChild (en-US)
    38. lastModified
    39. lastStyleSheetSet Non-standard Obsolète
    40. linkColor (en-US) Obsolète
    41. links (en-US)
    42. location
    43. pictureInPictureElement (en-US)
    44. pictureInPictureEnabled (en-US)
    45. plugins (en-US)
    46. pointerLockElement (en-US)
    47. preferredStyleSheetSet Non-standard Obsolète
    48. readyState
    49. referrer
    50. rootElement (en-US) Obsolète
    51. scripts
    52. scrollingElement
    53. selectedStyleSheetSet Non-standard Obsolète
    54. styleSheets
    55. styleSheetSets Non-standard Obsolète
    56. timeline (en-US)
    57. title
    58. URL
    59. visibilityState
    60. vlinkColor (en-US) Obsolète
    61. xmlEncoding Obsolète
    62. xmlVersion Obsolète
  5. Méthodes d'instance
    1. adoptNode()
    2. append() (en-US)
    3. caretPositionFromPoint() (en-US)
    4. caretRangeFromPoint() Non-standard
    5. clear() Obsolète
    6. close() (en-US)
    7. createAttribute()
    8. createAttributeNS() (en-US)
    9. createCDATASection()
    10. createComment()
    11. createDocumentFragment()
    12. createElement()
    13. createElementNS()
    14. createEvent()
    15. createExpression()
    16. createNodeIterator()
    17. createNSResolver()
    18. createProcessingInstruction()
    19. createRange()
    20. createTextNode()
    21. createTouch() (en-US) Non-standard Obsolète
    22. createTouchList() (en-US) Non-standard Obsolète
    23. createTreeWalker()
    24. elementFromPoint()
    25. elementsFromPoint()
    26. enableStyleSheetsForSet() Non-standard Obsolète
    27. evaluate()
    28. execCommand() Obsolète
    29. exitFullscreen()
    30. exitPictureInPicture() (en-US)
    31. exitPointerLock()
    32. getAnimations() (en-US)
    33. getElementById()
    34. getElementsByClassName()
    35. getElementsByName()
    36. getElementsByTagName()
    37. getElementsByTagNameNS()
    38. getSelection()
    39. hasFocus()
    40. hasStorageAccess() (en-US)
    41. importNode()
    42. mozSetImageElement() Non-standard
    43. open()
    44. prepend() (en-US)
    45. queryCommandEnabled() (en-US) Non-standard Obsolète
    46. queryCommandState() Non-standard Obsolète
    47. queryCommandSupported() Non-standard Obsolète
    48. querySelector()
    49. querySelectorAll()
    50. releaseCapture() Non-standard
    51. replaceChildren() (en-US)
    52. requestStorageAccess() (en-US)
    53. startViewTransition() (en-US) Expérimental
    54. write()
    55. writeln()
  6. Évènements
    1. afterscriptexecute Non-standard
    2. beforescriptexecute Non-standard
    3. copy (en-US)
    4. cut (en-US)
    5. DOMContentLoaded
    6. fullscreenchange
    7. fullscreenerror
    8. lostpointercapture (en-US)
    9. paste (en-US)
    10. pointerlockchange (en-US)
    11. pointerlockerror (en-US)
    12. readystatechange
    13. scroll
    14. scrollend (en-US)
    15. selectionchange (en-US)
    16. visibilitychange (en-US)
  7. Héritage :
    1. Node
    2. EventTarget
  8. Pages liées à DOM
    1. AbortController (en-US)
    2. AbortSignal
    3. AbstractRange (en-US)
    4. Attr
    5. CDATASection
    6. CharacterData
    7. Comment
    8. CustomEvent
    9. DOMError
    10. DOMException
    11. DOMImplementation
    12. DOMParser
    13. DOMPoint
    14. DOMPointReadOnly
    15. DOMRect
    16. DOMTokenList
    17. DocumentFragment
    18. DocumentType
    19. Element
    20. Event
    21. EventTarget
    22. HTMLCollection
    23. MutationObserver
    24. MutationRecord (en-US)
    25. NamedNodeMap
    26. Node
    27. NodeIterator
    28. NodeList
    29. ProcessingInstruction
    30. Range
    31. StaticRange (en-US)
    32. Text
    33. TextDecoder (en-US)
    34. TextEncoder
    35. TimeRanges
    36. TreeWalker
    37. XMLDocument

In this article

  • Syntaxe
  • Exemple
  • Specification

Document.URL

Retourne l'URL du Document sous forme de string (lecture seule).

Syntaxe

var string = document.URL

Exemple

var currentURL = document.URL;
alert(currentURL);

Specification

  • DOM Level 2 HTML: URL

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 21 sept. 2022 by MDN contributors.

MDN logo

Your blueprint for a better internet.

  • MDN on Twitter
  • MDN on GitHub

MDN

  • About
  • Hacks Blog
  • Careers
  • Advertise with us

Support

  • Product help
  • Report an issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
Mozilla logo
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2023 by individual mozilla.org contributors. Content available under a Creative Commons license.