<html>
<head>
<base id="myBaseId" href="//www.w3xue.com/" />
</head>
<body>
<a href="/img/eg_landscape.jpg">HTML DOM</a>
<p>Base URL:
<script type="text/javascript">
x=document.getElementById('myBaseId');
document.write(x.href);
</script></p>
</body>
</html>