HTML basic tutorial form upload file field

Upload file field

##Syntax format:

Common attributes

  • name: the name of the form element

  • value: the value of the form element, this value is actually uploaded file name. The value attribute is a read-only attribute. The content of this value can only come from manually selected uploaded files, and the user cannot specify a path. For security reasons, value is read-only.

Note: Now only the upload file box can be implemented, but the upload function cannot be truly implemented. The upload function is implemented with PHP.

Note:

  • When you need to upload a file, the form submission method can only be post method,

  • You must add enctype="multipart/form-data" to the form tag

Example:

    用户注册 
欢迎注册php.cn
用户名:
密码:
性别:
爱好:运动 看电影 编程 宅着
所在地:
个性介绍:

上传头像:


Continuing Learning
||
用户注册
欢迎注册php.cn
用户名:
密码:
性别:
爱好:运动 看电影 编程 宅着
所在地:
个性介绍:

上传头像:
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!