Horje

How to add HTML <input> formtarget Attribute

A form with two submit buttons, with different target windows.

Definition and Usage

The formtarget attribute specifies a name or a keyword that indicates where to display the response that is received after submitting the form.

The formtarget attribute overrides the target attribute of the <form> element.

Note: The formtarget attribute can be used with type="submit" and type="image".


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Syntax

<input formtarget="_blank|_self|_parent|_top|framename">

Attribute Values

Value Description
_blank The response is displayed in a new window or tab
_self The response is displayed in the same frame (this is default)
_parent The response is displayed in the parent frame
_top The response is displayed in the full body of the window
framename The response is displayed in a named iframe
index.html
Example: HTML
<form action="/action_page.php">
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="submit" value="Submit as normal">
  <input type="submit" formtarget="_blank" value="Submit to a new window">
</form> 

Output should be:

How to add HTML <input> formtarget Attribute



Single Articles
How to add HTML <input> TagHTML Tag
How to add HTML <input> accept AttributeHTML Tag
How to add HTML <input> accept file_extension AttributeHTML Tag
How to add HTML <input> accept audio/* AttributeHTML Tag
How to add HTML <input> accept video/* AttributeHTML Tag
How to add HTML <input> accept image/* AttributeHTML Tag
How to add HTML <input> accept media_type AttributeHTML Tag
How to add HTML <input> alt AttributeHTML Tag
How to add HTML <input> autocomplete AttributeHTML Tag
How to add HTML <input> autocomplete on AttributeHTML Tag
How to add HTML <input> autocomplete off AttributeHTML Tag
How to add HTML <input> autocomplete address-line1 AttributeHTML Tag
How to add HTML <input> autocomplete address-line2 AttributeHTML Tag
How to add HTML <input> autocomplete address-line3 AttributeHTML Tag
How to add HTML <input> autocomplete address-level1 AttributeHTML Tag
How to add HTML <input> autocomplete address-level2 AttributeHTML Tag
How to add HTML <input> autocomplete address-level3 AttributeHTML Tag
How to add HTML <input> autocomplete address-line4 AttributeHTML Tag
How to add HTML <input> autocomplete street-address AttributeHTML Tag
How to add HTML <input> autocomplete country AttributeHTML Tag
How to add HTML <input> autocomplete country-name AttributeHTML Tag
How to add HTML <input> autocomplete postal-code AttributeHTML Tag
How to add HTML <input> autocomplete name AttributeHTML Tag
How to add HTML <input> autocomplete additional-name AttributeHTML Tag
How to add HTML <input> autocomplete family-name AttributeHTML Tag
How to add HTML <input> autocomplete give-name AttributeHTML Tag
How to add HTML <input> autocomplete honoric-prefix AttributeHTML Tag
How to add HTML <input> autocomplete name AttributeHTML Tag
How to add HTML <input> autocomplete nickname AttributeHTML Tag
How to add HTML <input> autocomplete organization-title AttributeHTML Tag
How to add HTML <input> autocomplete username AttributeHTML Tag
How to add HTML <input> autocomplete new-password AttributeHTML Tag
How to add HTML <input> autocomplete new-password AttributeHTML Tag
How to add HTML <input> autocomplete current-password AttributeHTML Tag
How to add HTML <input> autocomplete bday AttributeHTML Tag
How to add HTML <input> autocomplete bday-day AttributeHTML Tag
How to add HTML <input> autocomplete bday-month AttributeHTML Tag
How to add HTML <input> autocomplete bday-year AttributeHTML Tag
How to add HTML <input> autocomplete sex AttributeHTML Tag
How to add HTML <input> autocomplete one-time-code AttributeHTML Tag
How to add HTML <input> autocomplete organization AttributeHTML Tag
How to add HTML <input> autocomplete cc-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-given-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-additional-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-family-name AttributeHTML Tag
How to add HTML <input> autocomplete cc-number AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp-month AttributeHTML Tag
How to add HTML <input> autocomplete cc-exp-year AttributeHTML Tag
How to add HTML <input> autocomplete cc-csc AttributeHTML Tag
How to add HTML <input> autocomplete cc-type AttributeHTML Tag
How to add HTML <input> autocomplete transaction-currency AttributeHTML Tag
How to add HTML <input> autocomplete transaction-amount AttributeHTML Tag
How to add HTML <input> autocomplete language AttributeHTML Tag
How to add HTML <input> autocomplete url AttributeHTML Tag
How to add HTML <input> autocomplete email AttributeHTML Tag
How to add HTML <input> autocomplete photo AttributeHTML Tag
How to add HTML <input> autocomplete tel AttributeHTML Tag
How to add HTML <input> autocomplete tel-country-code AttributeHTML Tag
How to add HTML <input> autocomplete tel-national AttributeHTML Tag
How to add HTML <input> autocomplete tel-area-code AttributeHTML Tag
How to add HTML <input> autocomplete tel-local AttributeHTML Tag
How to add HTML <input> autocomplete tel-local-prefix AttributeHTML Tag
How to add HTML <input> autocomplete tel-local-suffix AttributeHTML Tag
How to add HTML <input> autocomplete tel-extension AttributeHTML Tag
How to add HTML <input> autocomplete impp AttributeHTML Tag
How to add HTML <input> autofocus AttributeHTML Tag
How to add HTML <input> checked AttributeHTML Tag
How to add HTML <input> dirname AttributeHTML Tag
How to add HTML <input> disabled AttributeHTML Tag
How to add HTML <input> form AttributeHTML Tag
How to add HTML <input> formaction AttributeHTML Tag
How to add HTML <input> formenctype AttributeHTML Tag
How to add HTML <input> formmethod AttributeHTML Tag
How to add HTML <input> formmethod get AttributeHTML Tag
How to add HTML <input> formmethod post AttributeHTML Tag
How to add HTML <input> formnovalidate AttributeHTML Tag
How to add HTML <input> formtarget AttributeHTML Tag
How to add HTML <input> formtarget _blank AttributeHTML Tag
How to add HTML <input> formtarget _self AttributeHTML Tag
How to add HTML <input> formtarget _parent AttributeHTML Tag
How to add HTML <input> formtarget _top AttributeHTML Tag
How to add HTML <input> formtarget framename AttributeHTML Tag
How to set HTML <input> height AttributeHTML Tag
How to set HTML <input> list AttributeHTML Tag
How to add HTML <input> max AttributeHTML Tag
How to add HTML <input> max number AttributeHTML Tag
How to add HTML <input> max date AttributeHTML Tag
How to add HTML <input> maxlength AttributeHTML Tag
How to add HTML <input> min AttributeHTML Tag
How to add HTML <input> min number AttributeHTML Tag
How to add HTML <input> min date AttributeHTML Tag
How to add HTML <input> minlength AttributeHTML Tag
How to add HTML <input> multiple AttributeHTML Tag
How to add HTML <input> name AttributeHTML Tag
How to add HTML <input> pattern AttributeHTML Tag
How to add HTML <input> pattern Specific characters AttributeHTML Tag
How to add HTML <input> pattern uppercase and lowercase letter AttributeHTML Tag
How to add HTML <input> pattern characters @,.;''#$%^&8 AttributeHTML Tag
How to add HTML <input> pattern characters [^'\x22]+HTML Tag
How to add HTML <input> pattern characters http:// or https://HTML Tag
How to add HTML <input> placeholder AttributeHTML Tag
How to add HTML <input> popovertarget AttributeHTML Tag
How to add HTML <input> popovertargetaction AttributeHTML Tag
How to add HTML <input> popovertargetaction hide AttributeHTML Tag
How to add HTML <input> popovertargetaction show AttributeHTML Tag
How to add HTML <input> popovertargetaction toggle AttributeHTML Tag
How to add HTML <input> readonly AttributeHTML Tag
How to add HTML <input> required AttributeHTML Tag
How to add HTML <input> size AttributeHTML Tag
How to add HTML <input> src AttributeHTML Tag
How to add HTML <input> step AttributeHTML Tag
How to add HTML <input> type AttributeHTML Tag
How to add HTML <input> type button AttributeHTML Tag
How to add HTML <input> type checkbox AttributeHTML Tag
How to add HTML <input> type color AttributeHTML Tag
How to add HTML <input> type date AttributeHTML Tag
How to add HTML <input> type datetime-local AttributeHTML Tag
How to add HTML <input> type email AttributeHTML Tag
How to add HTML <input> type file AttributeHTML Tag
How to add HTML <input> type hidden AttributeHTML Tag
How to add HTML <input> type image AttributeHTML Tag
How to add HTML <input> type month AttributeHTML Tag
How to add HTML <input> type number AttributeHTML Tag
How to add HTML <input> type password AttributeHTML Tag
How to add HTML <input> type radio AttributeHTML Tag
How to add HTML <input> type range AttributeHTML Tag
How to add HTML <input> type reset AttributeHTML Tag
How to add HTML <input> type search AttributeHTML Tag
How to add HTML <input> type submit AttributeHTML Tag
How to add HTML <input> type tel AttributeHTML Tag
How to add HTML <input> type text AttributeHTML Tag
How to add HTML <input> type time AttributeHTML Tag
How to add HTML <input> type url AttributeHTML Tag
How to add HTML <input> type week AttributeHTML Tag
How to add HTML <input type="button">HTML Tag
How to add HTML <input type="checkbox">HTML Tag
How to add HTML <input type="color">HTML Tag
How to add HTML <input type="date">HTML Tag
How to add HTML <input type="datetime-local">HTML Tag
How to add HTML <input type="email">HTML Tag
How to add HTML <input type="file">HTML Tag
How to add HTML <input type="hidden">HTML Tag
How to add HTML <input type="image">HTML Tag
How to add Align input image (with CSS) on Submit ButtonHTML Tag
How to add HTML <input type="month">HTML Tag
How to add HTML <input type="number">HTML Tag
How to add HTML <input type="password">HTML Tag
How to add HTML <input type="radio">HTML Tag
How to add HTML <input type="range">HTML Tag
How to add HTML <input type="reset">HTML Tag
How to add HTML <input type="search">HTML Tag
How to add HTML <input type="submit">HTML Tag
How to add HTML <input type="tel">HTML Tag
How to add HTML <input type="text">HTML Tag
How to add HTML <input type="time">HTML Tag
How to add HTML <input type="url">HTML Tag
How to add HTML <input type="week">HTML Tag
How to add HTML <input> value AttributeHTML Tag
How to add HTML <input> width AttributeHTML Tag


Related Articles
What is HTML <!--...--> Tag HTML Tag
What is HTML <!DOCTYPE> Declaration HTML Tag
What is HTML Elements and Doctypes HTML Tag
What is HTML <a> Tag HTML Tag
What is HTML <abbr> Tag HTML Tag
What is HTML <acronym> Tag HTML Tag
What is HTML <address> Tag HTML Tag
What is HTML <applet> Tag HTML Tag
What is HTML <area> Tag HTML Tag
What is HTML <article> Tag HTML Tag
What is HTML <aside> Tag HTML Tag
What is HTML <audio> Tag HTML Tag
What is HTML <b> Tag HTML Tag
What is HTML <base> Tag HTML Tag
What is HTML <basefont> Tag HTML Tag
What is HTML <bdi> Tag HTML Tag
What is HTML <bdo> Tag HTML Tag
What is HTML <big> Tag HTML Tag
What is HTML <blockquote> Tag HTML Tag
What is HTML <body> Tag HTML Tag
What is HTML <br> Tag HTML Tag
What is HTML <button> Tag HTML Tag
What is HTML <canvas> Tag HTML Tag
What is HTML <caption> Tag HTML Tag
What is HTML <center> Tag HTML Tag
What is HTML <cite> Tag HTML Tag
What is HTML <code> Tag HTML Tag
What is HTML <col> Tag HTML Tag
How to create HTML <colgroup> Tag HTML Tag
What is HTML <data> Tag HTML Tag
What is HTML <datalist> Tag HTML Tag
What is HTML <dd> Tag HTML Tag
What is HTML <del> Tag HTML Tag
What is HTML <details> Tag HTML Tag
What is HTML <dfn> Tag HTML Tag
What is HTML <dialog> Tag HTML Tag
What is HTML <dir> Tag HTML Tag
What is HTML <div> Tag HTML Tag
What is HTML <dl> Tag HTML Tag
What is HTML <dt> Tag HTML Tag
What is HTML <em> Tag HTML Tag
What is HTML <embed> Tag HTML Tag
What is HTML <fieldset> Tag HTML Tag
What is HTML <figcaption> Tag HTML Tag
What is HTML <figure> Tag HTML Tag
What is HTML <font> Tag HTML Tag
What is HTML <footer> Tag HTML Tag
What is HTML <form> Tag HTML Tag
What is HTML <frame> Tag HTML Tag
What is HTML <frameset> Tag HTML Tag
What is HTML <h1> to <h6> Tags HTML Tag
What is HTML <head> Tag HTML Tag
What is HTML <header> Tag HTML Tag
What is HTML <hgroup> Tag HTML Tag
What is HTML <hr> Tag HTML Tag
What is HTML <html> Tag HTML Tag
What is HTML <i> Tag HTML Tag
What is HTML <iframe> Tag HTML Tag
What is HTML <img> Tag HTML Tag
What is HTML <input> Tag HTML Tag
What is HTML <ins> Tag HTML Tag
What is HTML <kbd> Tag HTML Tag
What is HTML <label> Tag HTML Tag
What is HTML <legend> Tag HTML Tag
What is HTML <li> Tag HTML Tag
What is HTML <link> Tag HTML Tag
What is HTML <main> Tag HTML Tag
What is HTML <map> Tag HTML Tag
What is HTML <mark> Tag HTML Tag
What is HTML <menu> Tag HTML Tag
What is HTML <meta> Tag HTML Tag
What is HTML <meter> Tag HTML Tag
What is HTML <nav> Tag HTML Tag
What is HTML <noframes> Tag HTML Tag
What is HTML <noscript> Tag HTML Tag
What is HTML <object> Tag HTML Tag
What is HTML <ol> Tag HTML Tag
What is HTML <optgroup> Tag HTML Tag
What is HTML <option> Tag HTML Tag
What is HTML <output> Tag HTML Tag
What is HTML <p> Tag HTML Tag
What is HTML <param> Tag HTML Tag
What is HTML <picture> Tag HTML Tag
What is HTML <pre> Tag HTML Tag
What is HTML <progress> Tag HTML Tag
What is HTML <q> Tag HTML Tag
What is HTML <rp> Tag HTML Tag
What is HTML <rt> Tag HTML Tag
What is HTML <ruby> Tag HTML Tag
What is HTML <s> Tag HTML Tag
What is HTML <samp> Tag HTML Tag
What is HTML <script> Tag HTML Tag
What is HTML <search> Tag HTML Tag
What is HTML <section> Tag HTML Tag
What is HTML <select> Tag HTML Tag
What is HTML <small> Tag HTML Tag
What is HTML <source> Tag HTML Tag

Type:
Html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin



Share on: