Target Attribute in HTML Frames

 <!DOCTYPE html>
<html>
<body>

<form action="https://www.destinationurl.com" method="get" target="_blank">
  First name: <input type="text" name="fname"><br>
  Last name: <input type="text" name="lname"><br>
  <input type="submit" value="Submit">
</form>

</body>
</html>

Syntax

<form target="_blank|_self|_parent|_top|framename">

Attribute Values

ValueDescription
_blankThe response is displayed in a new window or tab
_selfThe response is displayed in the same frame (this is default)
_parentThe response is displayed in the parent frame
_topThe response is displayed in the full body of the window
framenameThe response is displayed in a named iframe

No comments:

Post a Comment