要定位当前页面的顶部并突破当前使用的任何框架集,您将<a href="page.htm" target="_top">
在 HTML 中使用。在 Javascript 中,您使用:
top.location.href = 'page.htm';
要定位当前页面或框架,您可以<a href="page.htm" target="_self">
在 HTML 中使用。在 Javascript 中,您使用:
self.location.href = 'page.htm';
要定位父框架,您可以<a href="page.htm" target="_parent">
在 HTML 中使用。在 Javascript 中,您使用:
parent.location.href = 'page.htm';
要定位框架集中的特定框架,您可以<a href="page.htm" target="thatframe">
在 HTML 中使用。在 Javascript 中,您使用:
top.frames['thatframe'].location.href = 'page.htm';
要定位当前页面中的特定 iframe,您可以<a href="page.htm" target="thatframe">
在 HTML 中使用。在 Javascript 中,您使用:
self.frames['thatframe'].location.href = 'page.htm';