Latest web development tutorials

HTML DOM FileUpload disabled property

FileUpload Object Reference FileUpload object

Examples

Example 1

Disable FileUpload button:

<script>

document.getElementById("imgfile").disabled=true;

</script>

Output:


try it"


Definition and Usage

disabled property sets or returns the file upload button is available.

Disabled input elements are neither available, nor click. You can set the disabled property until meet certain other conditions are met (such as selecting a checkbox, etc.). Then, you need to remove the disabled value by JavaScript, the value of the input element is switched available.

grammar

Set the disabled attribute:

element .disabled=true|false

Returns disabled properties:

element .disabled


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support disabled property


FileUpload Object Reference FileUpload object