TUTORIALFrontendFETCHED

HTML DOM baseURI 属性

HTML DOM baseURI 属性 Document 对象 实例 获取文档的基础URI: [mycode3 type='js']document.baseURI;[/mycode3] 输出结果: https://www.runoob.com/jsref/prop-doc-baseuri.html 尝试一下 » 定义和用法 baseURI 属性返回 HTML 文档的基础URI。 浏览器支持 除..

Updated 7/16/2026

Tutorial detail pages default to noindex.

HTML DOM baseURI 属性

Document 对象参考手册 Document 对象

实例

获取文档的基础URI:

document.baseURI;

输出结果:

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

尝试一下 »

定义和用法

baseURI 属性返回 HTML 文档的基础URI。


浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

除了 IE 浏览器,其他主流浏览器都支持 baseURI 属性。


语法

node.baseURI

技术细节

返回值: 字符串, 代表节点页面的URI
DOM 版本 Core Level 3 Node Object


Document 对象参考手册 Document 对象