..... Where ElementName is any supported element. Syntax: For returning the readOnly property: inputdateObject.readOnly; For setting the readOnly property: To be on the safe side, i use both selectors. //document.getElementById('text1').selectionStart; this line gives us the current position/start position of the cursor. on selecting textarea element. I got that function "isElementEditableText"(line 799) of "SelectionHandler routine module" got a bug, that its only checking whether the element is input element or textareaelement. textarea maxlength validation in javascript, how to set maxlength for textarea in javascript, how to set maxlength for textarea in html, textarea character limit javascript, textarea character count javascript, textarea remaining character count javascript For the CSS selector to work if you set readOnly with JavaScript you have to use the selector textarea[readonly]. object.readOnly = true | false. The readOnly property sets or returns whether a text field is read-only, or not. The readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number types and the Here’s a look at how those two attributes affect the presentation of a textarea. Sets or returns whether the contents of a text area is read-only: required: Sets or returns whether the text area must be filled out before submitting a form: rows: Sets or returns the value of the rows attribute of a text area: type: Returns the type of the form element the text area is: value: Sets or returns the contents of a text area: wrap .cf-formwrap textarea[readonly] {background-color:purple !important;} 3 0. Return the readOnly property. The Here’s a look at how those two attributes affect the presentation of a textarea. Sets or returns whether the contents of a text area is read-only: required: Sets or returns whether the text area must be filled out before submitting a form: rows: Sets or returns the value of the rows attribute of a text area: type: Returns the type of the form element the text area is: value: Sets or returns the contents of a text area: wrap .cf-formwrap textarea[readonly] {background-color:purple !important;} 3 0. Return the readOnly property. The