Submit disabledProperties

Submit 对象参考手册Submit Object

Examples

Example 1

Disable the submit button:

<script>

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

</script>

Output:


Try it Yourself »


Definition and Usage

The disabled property sets or returns whether the submit button is disabled.

Disabled elements are neither usable nor clickable. The disabled attribute can be set until certain other conditions are met (for example, a checkbox is selected, etc.).

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.


Submit 对象参考手册Submit Object Other Extensions