FileUpload disabledProperty

FileUpload 对象参考手册FileUpload Object

Examples

Example 1

Disable the FileUpload button:

<script>

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

</script>

Output:


Try it »


Definition and Usage

The disabled property sets or returns whether the file upload button is enabled.

A disabled input element is unusable and unclickable. The disabled attribute can be set until certain other conditions are met (for example, selecting a checkbox, etc.). Then, JavaScript is needed to remove the disabled value to switch the input element to an enabled state.

Syntax

Set the disabled property:

element.disabled=true|false

Return the disabled property:

element.disabled


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled property.


FileUpload 对象参考手册FileUpload Object Other Extensions