Home > Web Front-end > HTML Tutorial > How to specify which HTTP method to use when sending form data in HTML?

How to specify which HTTP method to use when sending form data in HTML?

WBOY
Release: 2023-08-20 19:17:08
forward
774 people have browsed it

How to specify which HTTP method to use when sending form data in HTML?

Use the method attribute to specify the HTTP method to use when sending form data in HTML.

Example

You can try the following code to implement the method attribute−

<!DOCTYPE html>
<html>
   <head>
   <title>HTML option Tag</title>
   </head>
   <body>
      <form action = "/cgi-bin/dropdown.cgi" method = "post">
         <select name = "dropdown">
            <option value = "HTML" selected>HTML</option>
            <option value = "Ruby">Ruby</option>
         </select>
         <input type = "submit" value = "Submit" />
      </form>
   </body>
</html>
Copy after login

The above is the detailed content of How to specify which HTTP method to use when sending form data in HTML?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template