HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Input FileUpload Object : Find out if a file must be selected/uploaded before submitting a form
The required property sets or returns whether a file in the file upload field must be selected/uploaded before submitting a form.
This property reflects the HTML required attribute.
Property | |||||
---|---|---|---|---|---|
required | Yes | 10.0 | Yes | Not supported | Yes |
Return the required property:
Set the required property:
Value | Description |
---|---|
true|false |
Specifies whether a file upload field should be a required part of form submission.
|
Return Value: | A Boolean, returns true if the file upload field is a required part of form submission, otherwise it returns false |
---|
Set a file upload field to be a required part of form submission:
document.getElementById("myFile").required = true;
HTML reference: HTML <input> required attribute
❮ Input FileUpload Object