This example sets the base URL of the document to a reference folder. Microsoft?Internet Explorer uses the BASE element to resolve the link to http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/href_2.asp.<HEAD>
<BASE HREF="http://msdn.microsoft.com/workshop/author/dhtml/reference">
</HEAD><BODY>
Click <A HREF="properties/href_2.asp">here</A> to learn about the 
href property.
</BODY>
This example retrieves the base URL from the document if a valid BASE element is specified in the document. Otherwise, the function returns null. <SCRIPT>
function GetBase()
{
    var oBaseColl = document.all.tags('BASE');
    return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].href : 
        null );
}
</SCRIPT>

解决方案 »

  1.   

    _blank ------Load the linked document into a new blank window. This window is not named.    
    _search ------Load the linked document into the browser search pane. Available in Internet Explorer 5 or later.  
    _self ------Default. Load the linked document into the window in which the link was clicked (the active window).  
    _top ------Load the linked document into the topmost window.  
    _parent ------Load the linked document into the immediate parent of the document the link is in.
      

  2.   

    简单说
    <base target=_blank>//在空白页打开
    <base target=_parent>//在当前页的上一页(父亲)打开
    <base target=_search>//在浏览器地址栏打开
    <base target=_self>//在当前页打开
    <base target=_top>//在最初(祖先)页打开