Return where to display the response after submitting a form:
The result of x could be:
The formTarget property sets or returns the value of the formtarget attribute of a button.
The formtarget attribute specifies where to display the response after submitting the form. This attribute overrides the form's target attribute.
The formtarget attribute is only used for buttons with type="submit".
Note: The formtarget attribute is new for the <button> element in HTML5.
The formTarget property is supported in all major browsers.
Note: The formTarget property is not supported in Internet Explorer 9 and earlier versions.
Return the formTarget property:
Set the formTarget property:
|_blank||Loads the response in a new window/tab|
|_self||Loads the response in the same frame (this is default)|
|_parent||Loads the response in the parent frame|
|_top||Loads the response in the full body of the window|
|framename||Loads the response in a named iframe|
|Return Value:||A String, representing where to display the response after submitting the form|
Change the value of the formtarget attribute of a button:
Another example on returning the formTargert property:
HTML reference: HTML <button> formtarget attribute