小白教程
所有教程
关于
Search
172.69.7.88
172.69.7.88
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Prop doc baseuri”的源代码
本页内容
上一节:
Coll_doc_anchors
下一节:
Prop_doc_body
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:document.baseURI}}[[Category:dom obj document|5]] = HTML DOM baseURI 属性 = [[dom obj document|Document 对象]] 获取文档的基础URI: <sample title="" desc="" lang="html" hererun="1"> document.baseURI; </sample> 输出结果: <sample title="" desc="" lang="html" hererun="1"> http://www.xiaobai.wang/jsref/prop-doc-baseuri.html </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> </head> <body> <p id="demo">单击按钮显示基础URL</p> <button onclick="myFunction()">点我</button> <script> function myFunction(){ var x=document.getElementById("demo"); x.innerHTML=document.baseURI; } </script> <p><strong>注意:</strong> Internet Explorer不支持基础URI属性。</p> </body> </html> </run> == 定义和用法 == baseURI 属性返回 HTML 文档的基础URI。 == 浏览器支持 == 除了 IE 浏览器,其他主流浏览器都支持 baseURI 属性。 == 语法 == <pre> node.baseURI </pre> == 技术细节 == {| class="table table-striped table-hover" | 返回值: | 字符串, 代表节点页面的URI |- | DOM 版本 | Core Level 3 Node Object |} [[dom obj document|Document 对象]]
返回至“
Prop doc baseuri
”。
上一节:
Coll_doc_anchors
下一节:
Prop_doc_body