| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/formTarget | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The formTarget property of the HTMLInputElement interface is the tab, window, or iframe where the response of the submitted <form> is to be displayed. It reflects the value of the <input> element's formtarget attribute.
This property is valid only for submit and image <input> elements.
Its value overrides the target property of the HTMLFormElement interface if the form is submitted via the input. This property can be retrieved or set. If not set, the value is the empty string ("").
A string.
inputElement.formTarget = "_blank";
| Specification |
|---|
| HTML # dom-fs-formtarget |
HTMLInputElement.formActionHTMLInputElement.formEnctypeHTMLInputElement.formNoValidateHTMLInputElement.formMethodHTMLFormElement.target<input type="submit"><input type="image">This page was last modified on Apr 10, 2025 by MDN contributors.
HTMLInputElementacceptalphaaltautocompletecapturecheckedcolorSpacedefaultCheckeddefaultValuedirNamedisabledfilesformformActionformEnctypeformMethodformNoValidateformTargetheightindeterminatelabelslistmaxmaxLengthminminLengthmultiplenamepatternplaceholderpopoverTargetActionpopoverTargetElementreadOnlyrequiredselectionDirectionselectionEndselectionStartsizesrcsteptypevalidationMessagevalidityvaluevalueAsDatevalueAsNumberwebkitdirectorywebkitEntrieswidthwillValidateBeforeUnloadEventDOMStringMapErrorEventHTMLAnchorElementHTMLAreaElementHTMLAudioElementHTMLBRElementHTMLBaseElementHTMLBodyElementHTMLButtonElementHTMLCanvasElementHTMLDListElementHTMLDataElementHTMLDataListElementHTMLDialogElementHTMLDivElementHTMLDocumentHTMLElementHTMLEmbedElementHTMLFieldSetElementHTMLFormControlsCollectionHTMLFormElementHTMLFrameSetElementHTMLGeolocationElementHTMLHRElementHTMLHeadElementHTMLHeadingElementHTMLHtmlElementHTMLIFrameElementHTMLImageElementHTMLLIElementHTMLLabelElementHTMLLegendElementHTMLLinkElementHTMLMapElementHTMLMediaElementHTMLMenuElementHTMLMetaElementHTMLMeterElementHTMLModElementHTMLOListElementHTMLObjectElementHTMLOptGroupElementHTMLOptionElementHTMLOptionsCollectionHTMLOutputElementHTMLParagraphElementHTMLPictureElementHTMLPreElementHTMLProgressElementHTMLQuoteElementHTMLScriptElementHTMLSelectElementHTMLSourceElementHTMLSpanElementHTMLStyleElementHTMLTableCaptionElementHTMLTableCellElementHTMLTableColElementHTMLTableElementHTMLTableRowElementHTMLTableSectionElementHTMLTemplateElementHTMLTextAreaElementHTMLTimeElementHTMLTitleElementHTMLTrackElementHTMLUListElementHTMLUnknownElementHTMLVideoElementHashChangeEventHistoryImageDataLocationMessageChannelMessageEventMessagePortNavigatorPageRevealEventPageSwapEventPageTransitionEventPluginPluginArrayPromiseRejectionEventRadioNodeListTimeRangesUserActivationValidityStateWindowWorkletGlobalScopeYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |