国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

JavaScript-Referenzhandbuch / HTML DOM documentURI 屬性

HTML DOM documentURI 屬性

HTML DOM documentURI 屬性

實(shí)例

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

<p id="demo">單擊按鈕來顯示該文檔的位置</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í)例" 按鈕查看在線實(shí)例


定義和用法

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

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


瀏覽器支持

QQ截圖20161108165429.png

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


語法

設(shè)置文檔的 documentURI:

document.documentURI=locationURI

返回 documentURI:

document.documentURI

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

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