亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Manual Rujukan JavaScript / HTML DOM documentURI 屬性

HTML DOM documentURI 屬性

HTML DOM documentURI 屬性

實(shí)例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>

<p id="demo">單擊按鈕來(lái)顯示該文檔的位置</p>
<button onclick="myFunction()">點(diǎn)我</button>
<script>
function myFunction(){
	var x=document.getElementById("demo");
	x.innerHTML=document.documentURI;
}
</script>
<p><strong>注意:</strong>Internet Explorer不支持documentURI屬性。</p>

</body>
</html>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線(xiàn)實(shí)例


定義和用法

documentURI 屬性可設(shè)置或返回文檔的位置。

如果文檔由 DocumentImplementation 對(duì)象創(chuàng)建, 或者如果它未定義,則返回 null。


瀏覽器支持

QQ截圖20161108165429.png

除了 Internet Explorer 瀏覽器,其他瀏覽器都支持 documentURI 屬性。


語(yǔ)法

設(shè)置文檔的 documentURI:

document.documentURI=locationURI

返回 documentURI:

document.documentURI

技術(shù)細(xì)節(jié)

返回值:字符串, 代表文檔的URI。
DOM 版本Core Level 3 Document Object