Let Wufoo do the hard work. Sign up for a free account and start making forms the easy way.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form target="_self"> | |
<input type="submit" formtarget="_blank"> | |
</form> | |
Live Demo
The Low Down
The formtarget
attribute enables overriding of the target
attribute set in the <form>
opening tag, giving the browsing context, or target, of the form response.
- The
formtarget
attribute specifies which window should be used to display the form response. - Determines with window or frame the response will open in. “_self” is the default.
- Values can include “_blank”, “_self”, “_parent”, or “_top”, case-insensitive , or a name you create the name of a browsing context that doesn’t start with ‘_’.
- Valid as an attribute of elements that can submit a form, including
<input
type=submit>
and<input type=image>
and<button>
. - If the form is submitted via
<input
type=submit>
and<input type=image>
or<button>
with aformtarget
attribute set, that button’sformtarget
attribute value overrides thetarget
attribute of the<form>
.