HTML <input> Tag with the 'formtarget' Attribute

<form>
<!-- ...form contents... -->

<input type="submit" formaction="/resources/html-forms-action.cfm" formtarget="_blank">

</form>

In the above example we add the formtarget attribute to an <input> element.

The formtarget attribute allows you to specify the browsing context to load the destination indicated in the action attribute.

Possible values:

  • _blank
  • _self
  • _top
  • _parent
  • Any string with at least one character that does not start with a U+005F LOW LINE character.

The above values have different meanings based on whether the page is sandboxed or not. See the W3C website for more information on these values and their implications.