框架中的“target”

本文详细解释了HTML中使用不同target属性值时链接的行为差异。包括在同一框架、父框架、顶层框架、新窗口打开链接的方式,并介绍了如何指定链接到具体命名框架的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


target=_self
This will load the page in the same frame as the caller. 表示在目前窗口或框架里打开链接(默认的)

target=_parent
This causes the page to load in the same frameset as the caller taking the place of any sub frames. 表示在父窗口或框架里打开链接

target=_top
This loads the resulting page into the full body of the current window eliminating any frames. 表示在顶层框架里打开新链接

target=_blank
This opens up a new window and loads the page in to it. 表示始终在不同的新窗口打开链接

target=_new
Opens a new window and the page loads in it, all other links using same target open in this window.

表示始终在同一个新窗口打开链接



Whats this all about?
这些都是些什么东西呢?

By assigning a name to a frame via the name attribute, authors can refer to it as the "target" of links defined by other elements.

通过name属性为一个框架命名,作者就可以查阅由其它元素所定义的链接“target”。

e.g. If my frame is called "80four", then to get a link to open in that frame the code would read:

举个例子来说,如果我的框架叫做“80four”,那么,在这个框架中打开链接的具体代码如下:

<a href="pagename.html" target="80four">link name</a>


Then pagename.html would open in the frame "80four".

此时,“pagename.html”将在“80four”框架中打开。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值