概述
返回当前文档的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文档中也可以使用.