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就应该明白了。
<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就应该明白了。
解决方案 »
- 在google map上点击图标显示信息窗口:
- ASP.NET JavsScript 获取服务器控件的值
- javascript 循环的速度
- javascript控制层展开的问题
- 求助一个问题我用jquery动态添加html元素,比如:var html = '<input type="text"'+ 'placeholder=' + st
- 获取焦点的问题
- 关于删除图片的问题。。。。
- 如何判断一个输入框里的内容是普通字符还是汉字?
- var row = $(schId).datagrid('getSelected');
- 关于这个导航栏下拉应该怎么做
- 请大家帮我看看.谢谢!在线等~~
- 请问怎么让文本框只能输入数字(整数或小数)
<base href="http://localhost/index.htm"></base>,也不行呀。为什么?
谢谢!