Input FileUpload disabled attribute
Definition and Usage
disabled
Set or return whether the file upload button should be disabled.
Disabled elements are not available and cannot be clicked. By default, disabled elements are usually displayed in gray in the browser.
This property reflects the HTML disabled attribute.
See also:
HTML Reference Manual:HTML <input> disabled Attribute
Example
Example 1
Disable the FileUpload button:
document.getElementById("myFile").disabled = true;
Example 2
Check if the FileUpload button is disabled:
var x = document.getElementById("myFile").disabled;
Example 2
Enable and disable the FileUpload button:
function disableBtn() { document.getElementById("myFile").disabled = true; } function undisableBtn() { document.getElementById("myFile").disabled = false; }
Syntax
Return the disabled attribute:
fileuploadObject.disabled
Set the disabled attribute:
fileuploadObject.disabled = true|false
Attribute Value
Value | Description |
---|---|
true|false |
Specifies whether the file upload button should be disabled
|
Technical Details
Return value: | Boolean value, returned if the file upload button is disabled true ; otherwise return false . |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |