The URL read-only property of the Document interface returns the document location as a string.
Syntax
var string = document.URL
The URL read-only property of the Document interface returns the document location as a string.
var string = document.URL
DocumentDocument.activeElementDocument.alinkColorDocument.anchorsDocument.appletsDocument.asyncDocument.bgColorDocument.bodyDocument.characterSetParentNode.childElementCountParentNode.childrenDocument.compatModeDocument.contentTypeDocument.currentScriptDocument.defaultViewDocument.designModeDocument.dirDocument.doctypeDocument.documentElementDocument.documentURIDocument.documentURIObjectDocument.domainDocument.domConfigDocument.embedsDocument.fgColorParentNode.firstElementChildDocument.formsDocument.headDocument.heightDocument.imagesDocument.implementationDocument.inputEncodingParentNode.lastElementChildDocument.lastModifiedDocument.lastStyleSheetSetDocument.linkColorDocument.linksDocument.locationDocument.mozFullScreenDocument.mozFullScreenElementDocument.mozFullScreenEnabledDocument.mozSyntheticDocumentGlobalEventHandlers.onabortDocument.onafterscriptexecuteDocument.onbeforescriptexecuteGlobalEventHandlers.onblurGlobalEventHandlers.onchangeGlobalEventHandlers.onclickGlobalEventHandlers.oncloseGlobalEventHandlers.oncontextmenuGlobalEventHandlers.ondblclickGlobalEventHandlers.onerrorGlobalEventHandlers.onfocusGlobalEventHandlers.oninputGlobalEventHandlers.onkeydownGlobalEventHandlers.onkeypressGlobalEventHandlers.onkeyupGlobalEventHandlers.onloadGlobalEventHandlers.onmousedownGlobalEventHandlers.onmousemoveGlobalEventHandlers.onmouseoutGlobalEventHandlers.onmouseoverGlobalEventHandlers.onmouseupDocument.onofflineDocument.ononlineGlobalEventHandlers.onresetGlobalEventHandlers.onresizeGlobalEventHandlers.onscrollGlobalEventHandlers.onselectGlobalEventHandlers.onsubmitDocument.originDocument.pluginsDocument.pointerLockElementDocument.popupNodeDocument.preferredStyleSheetSetDocument.readyStateDocument.referrerDocument.scriptsDocument.scrollingElementDocument.selectedStyleSheetSetDocument.styleSheetsDocument.styleSheetSetsDocument.titleDocument.tooltipNodeDocument.URLDocument.vlinkColorDocument.widthDocument.xmlEncodingDocument.xmlVersionDocument.adoptNode()Document.caretPositionFromPoint()Document.caretRangeFromPoint()Document.clear()Document.close()Document.createAttribute()Document.createCDATASection()Document.createComment()Document.createDocumentFragment()Document.createElement()Document.createElementNS()Document.createEntityReference()Document.createEvent()Document.createExpression()Document.createNodeIterator()Document.createNSResolver()Document.createProcessingInstruction()Document.createRange()Document.createTextNode()Document.createTouch()Document.createTouchList()Document.createTreeWalker()Document.elementFromPoint()Document.enableStyleSheetsForSet()Document.evaluate()Document.execCommand()Document.exitPointerLock()Document.getBoxObjectFor()Document.getElementById()Document.getElementsByClassName()Document.getElementsByName()Document.getElementsByTagName()Document.getElementsByTagNameNS()Document.getSelection()Document.hasFocus()Document.importNode()Document.loadOverlay()Document.mozCancelFullScreen()Document.mozSetImageElement()Document.open()Document.queryCommandSupported()Document.querySelector()Document.querySelectorAll()Document.registerElement()Document.releaseCapture()Document.write()Document.writeln()AttrByteStringCDATASectionCharacterDataChildNodeCommentCustomEventDOMConfigurationDOMErrorDOMErrorHandlerDOMExceptionDOMImplementationDOMImplementationListDOMImplementationRegistryDOMImplementationSourceDOMLocatorDOMObjectDOMParserDOMPointDOMRectDOMStringDOMTimeStampDOMTokenListDOMUserDataDocumentFragmentDocumentTypeElementElementTraversalEntityEntityReferenceEventEventTargetHTMLCollectionMutationObserverNodeNodeFilterNodeIteratorNodeListNonDocumentTypeChildNodeProcessingInstructionPromiseResolverRangeSelectionTextTextDecoderTextEncoderTimeRangesTreeWalkerTypeInfoUSVStringUserDataHandlerXMLDocument