Input FileUpload disabled attribute
Definition and Usage
disabled
Property to 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.
Also see:
HTML Reference Manual:HTML <input> disabled ɣarmin
Example
Example 1
Banawa Button FileUpload:
document.getElementById("myFile").disabled = true;
Example 2
Gana Button FileUpload sabon kai yana banawa ko:
var x = document.getElementById("myFile").disabled;
Example 2
Banawa da kama yancin banawa Button FileUpload:
function disableBtn() { document.getElementById("myFile").disabled = true; } function undisableBtn() { document.getElementById("myFile").disabled = false; }
Syntax
Rannar disabled:
fileuploadObject.disabled
Dabbobiyar disabled:
fileuploadObject.disabled = true|false
Attribute Value
Value | Description |
---|---|
true|false |
Specify whether the file upload button should be disabled.
|
Technical Details
Return value: | Boolean value, if the file upload button is disabled, it returns true ; otherwise return false . |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |