HTML CSS examples for HTML Tag:form
The target attribute sets where to display the response after submitting the form.
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 |
The following code shows how to Display the response received in a new window or tab:
<!DOCTYPE html> <html> <body> <form action="/action_page.php" 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><!-- ww w .j av a 2s.c o m--> </body> </html>