HTML DOM baseURIProperty

Document 对象参考手册Document Object

Examples

Get the base URI of the document:

document.baseURI;

Output result:

https://www.example.com/jsref/prop-doc-baseuri.html

Try it Yourself »

Definition and Usage

The baseURI property returns the base URI of the HTML document.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Except for IE, all other mainstream browsers support the baseURI property.


Syntax

node.baseURI

Technical Details

Return value: String, representing the URI of the node's page
DOM Version Core Level 3 Node Object


Document 对象参考手册Document Object

Other Extensions