search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

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: Form submitted the data 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.

new file
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>用户注册</title> </head> <body> <font size="5" color="red">欢迎注册php.cn</font> <form name="user" method="get" action="" > 用户名:<input type="text" name="username"/> <br/> 密码:<input type="password" name="userpwd"/> <br/> <input type="submit" value="提交信息"/> </form> </body> </html>
Reset Code
Automatic operation
submit
Preview Clear