Tools, FAQ, Tutorials:
HTML 'form' Element Attributes
What Are the Attributes of a "form" Element?
✍: FYIcenter.com
There are 3 commonly used attributes for a "form" element:
The URL of the form processing program is usually given to you by the Webmaster. You just put it into the "action" attribute directly. If you specify an empty "action" attribute, the URL of the current XHTML document will be used to submit the form data.
From an XHTML document author's point of view, method="get" and method="post" have no differences. Both of them will submit viewers input data to the submission program specified in the "action' attribute.
The default setting for enctype="application/x-www-form-urlencoded" for most of your forms. But you want upload files through a form, you need to use enctype="multipart/form-data" and method="post".
Some examples of "form" element with different attributes:
<!-- Submitting to the URL of the current document --> <form action=""></form> <!-- Submitting to a perl program --> <form action="/cgi-bin/survey.pl"></form> <!-- Submitting to a PHP program --> <form action="/survey.php" method="post"></form> <!-- Submitting to a PHP program for file uploading --> <form action="/upload.php" method="post" enctype="multipart/form-data"></form>
Â
⇒HTML Forms and Input Fields
⇒⇒HTML Tutorials
2017-04-19, 1161👍, 0💬
Popular Posts:
How to add request URL Template Parameters to my Azure API operation 2017 version to make it more us...
What Is HTML? HTML (HyperText Markup Language) is the standard markup language for creating Web page...
What Azure AD App Registration Manifest? Azure AD App Registration Manifest is JSON file that contai...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
How to add an API to an API product for internal testing on the Publisher Portal of an Azure API Man...