HTML Input accept Attribute - Chỉ chấp thuận lựa chọn kiểu thuộc tính file.

blogphp14 thg6 2020
HTML

w3schools.com

<input accept="file_extension|audio/*|video/*|image/*|media_type">

<input accept="audio/*,video/*,image/*" />.

Attribute Values

Value Description
file_extension Specify the file extension(s) (e.g: .gif, .jpg, .png, .doc) the user can pick from
audio/* The user can pick all sound files
video/* The user can pick all video files
image/* The user can pick all image files
media_type A valid media type, with no parameters. Look at IANA Media Types for a complete list of standard media types

Gửi bài viết tới Facebook

Gửi hình ảnh