英 [?ju: ɑ:r ?el] ? 美 [?ju:ɑ:r'el] ?
abbr.Uniform Resource Locator 在Internet的WWW服務(wù)程序上用于指定信息位置的表示方法
復(fù)數(shù): URLs
javascript URL屬性 語法
作用:返回當(dāng)前文檔的 URL。
語法:document.URL
說明:一般情況下,該屬性的值與包含文檔的 Window 的 location.href 屬性相同。不過,在 URL 重定向發(fā)生的時(shí)候,這個(gè) URL 屬性保存了文檔的實(shí)際 URL,而 location.href 保存了請(qǐng)求的 URL。
javascript URL屬性 示例
<html> <body> <meta charset="UTF-8"> 該文檔的 URL 是: <script type="text/javascript"> document.write(document.URL) </script> </body> </html>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例