HTML tags in forms in basic HTML tutorial

The

tag is used to create HTML forms for user input.
  • Forms can contain input elements, such as text fields, check boxes, radio buttons, submit buttons, etc.

  • Forms can also contain menus, textarea, fieldset, legend, and label elements.


Mark attribute
  • name: Give Give the form a name. This name is mainly used by JavaScript. JS is mainly used for client-side form validation.

  • method: The form submission method, value: get or post.

  • action: Specify the form handler, usually a PHP file.

  • #If the action is empty, where is the form data sent?

  • Result: Formsubmitted thedata to itself for processing.

  • enctype: Specify the encoding method (decryption method) of form data. This attribute can only be used when method = “post”.

  • application/x-www-form-urldecoded //Default encryption method

  • multipart/form-data //If you upload a file, this value must be its own.

Continuing Learning
||
用户注册
欢迎注册php.cn
用户名:
密码:
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!