<!DOCTYPE html> <html> <body> <h1>Document 对象</h1> <h2>baseURI 属性</h2> <p>文档的基准 URI 是:</p> <p id="demo"></p> <p>Internet Explorer 11 或更早版本不支持 baseURI 属性。</p> <script> let base = document.baseURI; document.getElementById("demo").innerHTML = base; </script> </body> </html>