Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

document.URL

概述

返回当前文档的URL地址

语法

string = document.URL 

备注

该属性的值和DOM Level 0中的document.location.href 属性的值是相等的.然而 document.location.href 是可写的, document.URL 是只读的.

document.documentURI 也返回与该属性相同的值,不过它在非HTML文档中也可以使用.

规范

DOM Level 2 HTML: URL

文档标签和贡献者

 此页面的贡献者: teoli, khalid32, ziyunfei
 最后编辑者: khalid32,