HTML form submit
From w3cyberlearnings
Contents |
HTML - Submit Button
A submit button is not a normal button, when a user clicks on the submit button the form send data for the server to process.
HTML - Syntax Submit Button
- You can define a name and value of the submit button
<input type="submit" name="name" value="Submit"/>
Example 1
<html> <head> <title>Button</title> </head> <body> <form> <input type="submit" name="send1" value="Send me"/><br/> <input type="submit" name="send2" value="Send Request" disabled="disabled"/><br/> <input type="submit" name="send3" value="Request New Password"/><br/> </form> </body> </html>
Output
Example 2
- Different submit button will be used to process a different request.
<html> <head> <title>Submit Button</title> </head> <body> <form> <p>Request Information</p> <label for="firstname">First Name:</label> <input type="text" id="firstname" name="firstname"/><br/> <label for="lastname">Last Name:</label> <input type="text" id="lastname" name="lastname"/><br/> <label for="emailrequest">Login Email:</label> <input type="text" id="emailrequest" name="emailrequest"/><br/> <input type="submit" name="send1" value="Name"/> <input type="submit" name="send2" value="Password"/> <input type="submit" name="send2" value="Secret Code"/><br/> </form> </body> </html>
Output
Related Link
- Form Radio
- Form Checkbox
- Form Button
- Form Submit
- Form Reset