href target属性
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">
【转自http://www.blogjava.net/casta/archive/2008/11/10/239659.html】
本文详细介绍了HTML中a标签的目标属性,包括_blank、_parent、_self和_top等,并提供了具体的使用示例。此外还分享了两个小技巧,帮助读者更好地理解和运用这些属性。
5946

被折叠的 条评论
为什么被折叠?



