
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML DOM Input Time disabled Property
The HTML DOM Input Time disabled property sets/returns whether Input Time is enabled or disabled.
Syntax
Following is the syntax −
- Returning boolean value - true/false
inputTimeObject.disabled
- Setting disabled to booleanValue
inputTimeObject.disabled = booleanValue
Boolean Values
Here, “booleanValue” can be the following −
booleanValue | Details |
---|---|
true | It defines that the input time is disabled. |
false | It defines that the input time is not disabled and it is also the default value. |
Example
Let us see an example of Input Time disabled property −
<!DOCTYPE html> <html> <head> <title>Input Time disabled</title> <style> form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } </style> </head> <body> <form> <fieldset> <legend>Time-disabled</legend> <label for="TimeSelect">Meeting At: <input type="time" id="TimeSelect" value="15:10"> </label> <input type="button" onclick="confirmMeet()" value="Confirm Meeting"> <div id="divDisplay"></div> </fieldset> </form> <script> var divDisplay = document.getElementById("divDisplay"); var inputTime = document.getElementById("TimeSelect"); function confirmMeet() { inputTime.disabled = true; divDisplay.textContent = 'Meeting fixed at : '+inputTime.value; } </script> </body> </html>
Output
This will produce the following output −
Before clicking ‘Confirm Meeting’ button −
After clicking ‘Confirm Meeting’ button −
- Related Articles
- HTML DOM Input URL disabled Property
- HTML DOM Input Week disabled Property
- HTML DOM Input Password disabled Property
- HTML DOM Input Search disabled Property
- HTML DOM Input Submit disabled property
- HTML DOM Input Text disabled Property
- HTML DOM Input Radio disabled Property
- HTML DOM Input Range disabled property
- HTML DOM Input Reset disabled property
- HTML DOM Input Button disabled Property
- HTML DOM Input FileUpload disabled Property
- HTML DOM Input Month disabled Property
- HTML DOM Input Number disabled Property
- HTML DOM Input Checkbox disabled Property
- HTML DOM Input Color disabled Property

Advertisements