六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 113|回复: 0

<base>标签

[复制链接]

升级  8.4%

168

主题

168

主题

168

主题

进士

Rank: 4

积分
542
 楼主| 发表于 2013-2-7 19:58:14 | 显示全部楼层 |阅读模式
target=showname 就是这个链接是提交给框架(frameset)name=showname

在页面<head></head>之间加入<base target=_blank>(XHTML:<base target="_blank" />),就会使该页面所有链接均为新开窗口打开。

<base>是一个链接基准标记,用以改变页面中所有链接标记的参数默认值。

引申应用:
<head><base href="http://www.163.com/" target="_blank" /></head>
<body><a href="163">网易</a></body>

那么不管这个页面放置在任何域下面,该链接都会指向http://www.163.com/



1._blank <a href="document.html" target="_blank">my document</a> 浏览器会另开一个新窗口显示document.html文档
2._parent <a href="document.html" target="_parent">my document</a> 指向父frameset文档
3._self <a href="document.html" target="_self">my document</a> 把文档调入当前页框
4._top <a href="document.html" target="_top">my document</a> 去掉所有页框并用document.html取代frameset文档
小技巧1:使别人的页框不能引用你的网页 在文件头加:<base target="_top">
小技巧2:在当前页打开连接或做刷新,提交到当前页在文件头加:<base target="_self">

1._blank
<a href="document.html" target="_blank">my document</a>
浏览器会另开一个新窗口显示document.html文档
2._parent
<a href="document.html" target="_parent">my document</a>
指向父frameset文档
<a href="document.html" target="_self">my document</a>
把文档调入当前页框
4._top
<a href="document.html" target="_top">my document</a>
去掉所有页框并用document.html取代frameset文档


转自:http://www.cnblogs.com/xycj123/articles/1322137.html
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表