亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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.

Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>用戶注冊(cè)</title> </head> <body> <font size="5" color="red">歡迎注冊(cè)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>
submitReset Code