BASE Element | base Object--------------------------------------------------------------------------------Specifies an explicit URL used to resolve links and references to external sources such as images and style sheets.Members TableThe following table lists the members exposed by the base object. Click a tab on the left to choose the type of member you want to view.ResWhen used, the base element must appear within the head of the document, before any elements that refer to an external source.This element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4.0.This element is not rendered.This element does not require a closing tag.ExamplesThis example sets the base URL of the document to a reference folder. Internet Explorer uses the base element to resolve the link to http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/href_2.asp.<HTML>
<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>
</HTML>
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>看看上面的Examples就应该明白了。

解决方案 »

  1.   

    To KimSoft(革命的小酒天天醉) 谢谢你,给我解释Base的含义,我也看明白了,我现在的问题是,我怎样才能在我的本地iis服务器下,达到别人网站下拉菜单的效果,我不能在我的网页中加入<base href="http://www.imolaceramica.it/jsps/portal/index.jsp"></base>,这个吧?我的网页叫index.htm,这个页面的html代码是别人网站的源代码,路径、Css和js都设置好了,预览的时候总是不行,我把上面的<base>改为
    <base href="http://localhost/index.htm"></base>,也不行呀。为什么?
    谢谢!