Prop Search Disabled
# Input Search disabled Property
[ Input Search Object](#)
## Example
Disable the search field:
document.getElementById("mySearch").disabled = true;
Output:
[Try it Β»](#)
* * *
## Definition and Usage
The disabled property is used to set or return whether a search field is disabled.
An element with the disabled attribute is unusable and unclickable. Disabled elements are usually rendered in gray in browsers.
This property reflects the HTML disabled attribute.
* * *
## Browser Support

The disabled property is supported by all major browsers.
* * *
## Syntax
Return the disabled property:
```javascript
_searchObject_.disabled
Set the disabled property:
```javascript
_searchObject_.disabled=true|false
## Property Values
| Value | Description |
| --- | --- |
| true|false | Specifies whether the search field is available. * true - The search field is unavailable * false - Default. The search field is available |
## Technical Details
| Return Value: | A Boolean. Returns true if the search field is unavailable, otherwise returns false |
| --- |
* * *
## More Examples
## Example
Check if the search field is available:
```javascript
var x = document.getElementById("mySearch").disabled;
The _x_ output will be:
```text
true
[Try it Β»](#)
## Example
Disable or enable the search field:
```javascript
function disableBtn() {
document.getElementById("mySearch").disabled = true;
}
function undisableBtn() {
document.getElementById("mySearch").disabled = false;
}
[Try it Β»](#)
* * *
## Related Pages
HTML Reference: (#)
* * Input Search Object](#)
YouTip