Home > Web Front-end > HTML Tutorial > In HTML, what is the name of the form to which the element belongs?

In HTML, what is the name of the form to which the element belongs?

WBOY
Release: 2023-09-10 23:13:02
forward
1150 people have browsed it

In HTML, what is the name of the form to which the element belongs?

Use the form attribute in HTML to set the name of one or more forms to which the element belongs in HTML.

Example

You can try running the following code to implement the form attribute -

<!DOCTYPE html>
<html>
   <body>
      <form action = "" method = "get" id = "myform">
         SubjectID: <input type = "number" name = "subid"><br>
         Subject Name: <input type = "text" name = "subname"><br>
         Total Students: <input type="number" name = "stcount"><br>
      </form>
      <button type = "submit" form = "myform" value = "Submit">Click</button>
   </body>
</html>
Copy after login

The above is the detailed content of In HTML, what is the name of the form to which the element belongs?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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