HTML DOM Input Week readOnly property
Examples
Week field set to read-only:
document.getElementById("myWeek").readOnly = true;
Output:
try it"
Definition and Usage
readOnly property sets or returns the week whether the field is read-only.
Read-only fields can not be modified. But you can copy the contents of the field.
This property reflects the HTML readonly attribute.
Tip: To ensure the accuracy of the form data, you can use the disabled property instead.
Browser Support
All major browsers support readOnly property.
Note: Internet Explorer or Firefox browser does not support <input type = "week"> element.
grammar
Back readOnly attributes:
weekObject .readOnly
Set readOnly properties:
weekObject .readOnly=true|false
Property Value
value | description |
---|---|
true | false | Describes the week field is read-only
|
technical details
return value: | Boolean value that, if the field is read-week return true, otherwise returns false. |
---|
More examples
Examples
View week field is read-only:
var x = document.getElementById("myWeek").readOnly;
x The output is: true
try it"
Related Pages
HTML Reference Manual: HTML <the INPUT> Readonly property
Input Week Objects