Easy Tutorial
❮ Prop Password Value Coll Table Tbodies ❯

Input Month readOnly Attribute

Input Month Object

Example

Set the month field to read-only:

Output result:


Definition and Usage

The readOnly attribute is used to set or return whether the month field is read-only.

A read-only field cannot be modified. However, its content can be copied.

This attribute reflects the HTML readonly attribute.

Tip: To ensure the accuracy of form data, you can use the disabled attribute instead.


Browser Support

All major browsers support the readOnly attribute.

Note: Internet Explorer or Firefox browsers do not support the <input> element with the type="month" attribute.


Syntax

Return the readOnly attribute:

Set the readOnly attribute:

Attribute Values

Value Description
true false Describes whether the month field is read-only<br>true - The month field is read-only<br>false - Default. The month field is not read-only

Technical Details

| Return Value: | Boolean, returns true if the month field is read-only, otherwise returns false. | | --- | --- |


More Examples

Example

Check if the month field is read-only:


Related Pages

HTML Reference: HTML <input> readonly Attribute


❮ Prop Password Value Coll Table Tbodies ❯