YouTip LogoYouTip

Att Input Formmethod

HTML input formmethod Attribute \n \n\n
\n \n HTML\n JavaScript\n CSS\n Vue\n React\n Python3\n Java\n C\n C++\n C#\n AI\n Go\n SQL\n Linux\n VS Code\n Bootstrap\n Git\n Local Bookmarks\n \n
\n\n \n\n
\n

HTML input formmethod Attribute

\n

The formmethod attribute specifies how to send the form-data (the form-data is sent to the page specified in the action attribute).

\n

Valid values:

\n
    \n
  • get - The data from the form will be encoded as part of the URL and sent using HTTP GET method.
  • \n
  • post - The data from the form will be sent using HTTP POST method.
  • \n
\n

Example:

\n
<form action="/submit_form.php" method="post">\n  <label for="fname">First name:</label><br>\n  <input type="text" id="fname" name="fname"><br>\n  <input type="submit" value="Submit">\n</form>
\n

Note: The default value of the formmethod attribute is get.

\n
← Att Input FormnovalidateAtt Input Formenctype β†’