Supported elements. This both are the example of where HTML TextArea Input . Thanks for contributing an answer to SharePoint Stack Exchange! Place the content into the clone. Stack Exchange Network Stack Exchange network consists of 178 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. attr('readonly') is actually operating on the DOM Level 1 HTML property readOnly, which is a boolean, so ‘true’ is more appropriate. What is the difference between TempData keep() and peek() function? Copy text from textarea jQuery - Learn Copy text from textarea jQuery with complete source code, explanation and demo. Making statements based on opinion; back them up with references or personal experience. me tried this. Are you sure? A read-only field cannot be modified. Is Price Discrimination in the Software Industry legal in the US? The readOnly property sets or returns whether the contents of a text area should be read-only. handler: function, the function to process the clicking action on this icon. The value of a disabled widget is not posted as part of a form whereas the value of a readonly widget is posted. All, What's the 'correct' way to change a to and from readonly. readonly. What is the correct name for this instrument? Focuses on using HTML5 to begin building Windows 8 and web apps. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. A class provides a default constructor for me. For HTML 4.01 DTD's the answer from CMS is working and valid HTML 4.01. Definition and Usage. When the widget is readonly it doesn't allow user input. Example 2: In this example the read-only attribute of form input text field is enabled by using setAttribute () method . Use jQuery methods to add the readonly attribute to the form input field.. jQuery attr() Method: This method set/return attributes and values of the selected elements. validity Read only The readonly attribute of the <textarea> element is used to set a textarea as readonly. Found inside... 2 Clicks the element and waits for the async bindings to complete 3 Fires a jQuery event on the given selector and waits ... When users click the text-block, it should transition into edit mode, showing the textarea element instead. HTML readonly attribute supports input and textarea elements. After reading the jQuery API for .prop, this should be the accepted answer. It's not caused by jQuery, here is the example in bare DOM/JS: . Third Party Plugin Solution $('input[type=text],textarea').prop('readonly', true); Please also note the difference between 'readonly' and 'disabled' in terms of appearance: Below is a