HTML <button> formtarget Attribute
Example A form with two submit buttons. The first submit button submits the form data with default target (“_self”), and the second submits the form data to a new window (target=”_blank”): <form action=”/action_page.php” method=”get”> First name: <input type=”text” name=”fname”><br> Last name: <input type=”text” name=”lname”><br> <button type=”submit” >Submit</button> <button type=”submit” formtarget=”_blank”>Submit to a new window</button> </form> Try it Yourself » Definition and Usage The formtarget attribute specifies where […]
