base URL是什么意思?干什么用的? 30

我在用frontpage做网页的时候,查看一个flash的属性,里面的常规选项有很多地址,比如说sourceURL(这个我知道是flash所在的文件夹位置)那下面的bas... 我在用frontpage做网页的时候,查看一个flash的属性,里面的常规选项有很多地址,比如说source URL(这个我知道是flash所在的文件夹位置)那下面的base URL是什么意思呢?干吗用的?我如果想给这个flash加一个链接地址应该怎么加? 展开
 我来答
jzj1982
2008-01-14 · TA获得超过2109个赞
知道小有建树答主
回答量:579
采纳率:0%
帮助的人:325万
展开全部
定义
指定一个显式 URL 用于解析对于外部源的链接和引用,如图像和样式表。

Specifies an explicit URL used to resolve links and references to external sources such as images and style sheets.

元素说明
当使用时,base 元素必须出现在文档的 head 内,在任何用于引用外部资源的元素之前。

此元素在 Internet Explorer 3.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。

此元素不改变内容的显示格式。

此元素不需要关闭标签。

When 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.

示例代码
下面的例子设置了文档的基础 URL 到一个引用文件夹。Internet Explorer 使用 base 元素来解析指向 http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/href_2.html 的链接。

This 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>

下面的例子表示,如在文档中指定了合法的 base 元素,则从文档中获取基础 URL;反之,返回 null。

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>

这是基本的HTML语言。用<base target=_××>来设置这个网页所有链接的目标窗口。也就是说,网页中只要添加<base target=_××>这句,那么所有的超链接就无须单独设置。最好将这句写在<head>和</head>之间。例如<base target=_blank>表示网页中所有的超链接的目标地址都在新建窗口中打开
参考资料:http://www.blabla.cn/html_tag_ref/base.html
Storm代理
2023-07-25 广告
StormProxies是一家提供动态代理服务器服务的企业,旨在帮助用户更好地管理网络访问和安全。以下是一些关于StormProxies的IP动态代理服务的特点:1. 高匿名性:StormProxies的动态代理服务器具有高匿名性,可以有效... 点击进入详情页
本回答由Storm代理提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式