tags. Example You can try running the following code to use the accept attribute:
Home > Article > Web Front-end > The capture and accept attributes of the HTML file input control do not work properly
Use the accept attribute to set the file types accepted by the server in HTML. This attribute can only be used in tags.
You can try running the following code to use the accept attribute:
<!DOCTYPE html> <html> <head> <title>File Upload Box</title> </head> <body> <form> <input type = "file" name = "fileupload" accept = "image/*" /> </form> </body> </html>
The capture attribute is a boolean property that, if specified, indicates that capturing media directly from the device is preferred. ..
The capture attribute is not used to include camera options in the dialog box, but indicates that capturing directly from the webcam is preferred.
The "correct" code is given below
<input type = "file" accept = "image/*">
The above is the detailed content of The capture and accept attributes of the HTML file input control do not work properly. For more information, please follow other related articles on the PHP Chinese website!