编辑下面的代码:【加编码】
<html> <head> <base id="htmldom" href="/jsref/"> </head> <body> <p>Base URL is: <script> document.write(document.getElementById("htmldom").href); </script> </p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂