target= out of a iframe but stays in the same browser window?
Currently, site A is embedded in a site B's iframe
. For one .php page, I'd like to jump out of the parent iframe
when submitting to the page:
<form method="post" action="home.php" name="homeForm" target="_blank">开发者_开发知识库
However, this will pop up a new window.
Is there a way to jump out of the iframe
but remind in the same browser window?
The usual approach is to use target="_parent"
or target="_top"
.
As per the HTML 4 specification:
_parent - The user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.
_top - The user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.
However, it should be noted that the use of iframes, etc. isn't a part of the HTML5 specification.
target="_parent"
this will help you
精彩评论