概述
返回当前文档的URL地址
语法
string = document.URL
备注
该属性的值和DOM Level 0中的document.location.href 属性的值是相等的.然而 document.location.href 是可写的, document.URL 是只读的.
document.documentURI 也返回与该属性相同的值,不过它在非HTML文档中也可以使用.
返回当前文档的URL地址
string = document.URL
该属性的值和DOM Level 0中的document.location.href 属性的值是相等的.然而 document.location.href 是可写的, document.URL 是只读的.
document.documentURI 也返回与该属性相同的值,不过它在非HTML文档中也可以使用.
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.onscrollGlobalEventHandlers.onselectGlobalEventHandlers.onsubmitDocument.originDocument.pluginsDocument.pointerLockElementDocument.popupNodeDocument.preferredStyleSheetSetDocument.readyStateDocument.referrerDocument.scriptsDocument.selectedStyleSheetSetDocument.styleSheetsDocument.styleSheetSetsDocument.titleDocument.tooltipNodeDocument.URLDocument.vlinkColorDocument.widthDocument.xmlEncodingDocument.xmlVersionDocument.adoptNode()Document.caretPositionFromPoint()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()