Thanks to visit codestin.com
Credit goes to www.tutorialspoint.com

Link Submit Button to Another Webpage Using HTML



Submit button automatically submits a form on click. Using HTML forms, you can easily take user input. The <form> tag is used to get user input, by adding the form elements. Different types of form elements include text input, radio button input, submit button, etc.

To link a submit button to another webpage, use the form action attribute. Add the link in the attribute, for example − <form action=”/new.php”>

Example

You can try to run the following code to link a submit button to another webpage −

<!DOCTYPE html>
<html>
   <body>
      <form action="/new.php">
         Student Name:<br> <input type="text" name="sname">
         <br>
         Student Subject:<br> <input type="text" name="ssubject">
         <br>
         <input type="submit" value="Submit">
      </form>
   </body>
</html>
Updated on: 2020-06-15T11:16:23+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements