
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How to specify where to send the form-data when a form is submitted in HTML?
Use the action attribute to add the file, where you want to reach after clicking Submit button. You can also add an email to send the data to that email-id.
Example
You can try to run the following code to set where to send the form-data when a form is submitted in HTML −
<!DOCTYPE html> <html> <body> <h2>Student Contact Form</h2> <form action = "mailto:emailid@example.com" method = "post" enctype = "text/plain"> Student Name:<br><input type = "text" name = "sname"> <br> Student Subject:<br><input type = "text" name = "ssubject"><br> <input type = "submit" value = "Send"> </form> </body> </html>
- Related Articles
- Set where to send the form-data when a form is submitted in HTML?
- How to specify the HTTP method to use when sending form-data in HTML?
- How to specify that the form should not be validated when disabled in HTML?
- How to prevent form from being submitted?
- How to specify which form element a calculation is bound to with HTML?
- How to specify whether the form-data should be encoded while submitting to the server with HTML?
- How to specify that the element must be filled out before submitting the form in HTML?
- How to get a key/value data set from a HTML form?
- How to reload the current page without losing any form data with HTML?
- How to send row data when clicking the button using javascript?
- Execute a script when a reset button in a form is clicked in HTML?
- How to Turn Off Form Autocompletion in HTML?
- How to extract raw form data in Laravel?
- How to read form data using JSP?
- How do we specify the target for where to open the linked document in HTML?

Advertisements