{"id":11674,"date":"2016-03-30T16:15:50","date_gmt":"2016-03-30T13:15:50","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=11674"},"modified":"2018-01-10T16:26:25","modified_gmt":"2018-01-10T14:26:25","slug":"javascript-textarea-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/","title":{"rendered":"Javascript Textarea Example"},"content":{"rendered":"<p>If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use a text-area field for the argumentation. It is a highly convenient feature of Javascript, and if you now want to add it to your own website, I would completely agree. But how can you do this exactly? See below!<\/p>\n<h2>1. The &lt;textarea&gt; element<\/h2>\n<p>The &lt;textarea&gt; tag represents an HTML element that consists of a text input field with multiple rows. It can hold an unlimited number of characters and usually has Courier set as it&#8217;s fixed font. There are two ways to define it&#8217;s size, one being by specifying the number of it&#8217;s columns and rows and the second can be done through the usage of CSS&#8217; <code>width<\/code> and <code>height<\/code>. <\/p>\n<p>This element has a corresponding object in Javascript which is the Textarea Object. It is supported by every browser, and is one of the many who got to be improved a lot with the presenting of HTML5 for everyone, as many other properties and methods were added to it. This element supports all the Global and Event attributes in HTML and implements the HTMLElement interface as every other element, but except from that also implements the HTMLTextAreaElement interface. Let&#8217;s see each of these aspect of the &lt;textarea&gt; element separately below.<br \/>\n&nbsp;<br \/>\n[ulp id=&#8217;tCIwOngQUb3zSUuF&#8217;]<\/p>\n<h2>2. &lt;textarea&gt; attributes<\/h2>\n<p>We mentioned above that as &lt;textarea&gt; is an element who got to be changed and improved a lot with the usage of HTML5. This happened because a number of new attributes were added to it.<\/p>\n<h3>2.1 HTML Attributes<\/h3>\n<p>Two of the most basic attributes of the element are <code>cols<\/code> and <code>rows<\/code>, both of the integer format, which are used to specify the visible width and length respectively of the input section in regards to an average character size. If specified, they must both be a positive number, else the default value is <code>20<\/code>. <\/p>\n<p>The <code>disabled<\/code> attribute is a boolean value that shows whether or not the user is to interact with the control. By default this attribute is set to 0, or otherwise inherited by the parent element.<\/p>\n<p>The <code>name<\/code> attribute is used to give a name to the control which can be used later to manipulate it&#8217;s information.<\/p>\n<p>Another attribute which has been there since the beginning is <code>readOnly<\/code>, which is a boolean value that shows whether or not the control should be read-only. The difference between this one and <code>disabled<\/code> is that it doesn&#8217;t prevent the user from selecting text or clicking in the control, while the first one does. However, <code>readOnly<\/code> does allow to submit the value of the textarea with the form.<\/p>\n<p><code>defaultValue<\/code> sets or returns the default value of the control in case it is not completed by the user while <code>form<\/code> returns a reference to the form that contains the text area. We use <code>value<\/code> to set or return the contents of the element, and <code>type<\/code> to get the type of the form element the text area is. <\/p>\n<h3>2.2 HTML5 Attributes<\/h3>\n<p>Some of the most important attributes that were added with HTML5 are: autocomplete, autofocus, form, maxlength, minlength, placeholder, required, selectionDirection, spellcheck, wrap etc. Let&#8217;s see what they do each at a time.<\/p>\n<ul>\n<li><code>autocomplete<\/code> &#8211; shows whether or not the browser should automatically complete the value of the control or not. When set to <code>off<\/code> the browser does not autocomplete the value, so it&#8217;s either explicitly entered by the user or autocompleted by the methods of the document. Otherwise, the browser automatically completes the value based on other values previously entered by the user in the form. <\/li>\n<li><code>autofocus<\/code> &#8211; is a boolean value that allows the control to have input focus when the page loads. Only one of the input fields can have this attribute set to <code>YES<\/code> in a form. <\/li>\n<li><code>form<\/code> &#8211; returns the ID value of the containing form element. In the cases where the &lt;textarea&gt; element is not a descendant of a form element, it will either return the ID value of the containing element, or <code>null<\/code>.<\/li>\n<li><code>maxLength<\/code> &#8211; specifies the number of characters to be inserted in the control. Usually, it is specified only when you want it to be a different value from that of the default, otherwise it&#8217;s left untouched. There is also a similar attribute named <code>minLength<\/code>. Can you guess what it does?<\/li>\n<li><code>placeholder<\/code> &#8211; is a string which normally offers the user an idea about what to enter in the control. However, it can be whatever you want it to be, and being funny and creative always pays off *hint-hint*.<\/li>\n<li><code>required<\/code> &#8211; is used to indicate a value which is customary to be filled before submitting the form, which would make it unable to be submitted if it&#8217;s left uncompleted.<\/li>\n<li><code>selectionDirection<\/code> &#8211; is an attribute which specifies the direction in which the selection is required to happen. It can either be <code>forward<\/code> in case the selection happens from the start to finish, or <code>backward<\/code> in case the selection happens starting from the end and going until the start, or <code>none<\/code> in case both of these options are allowed and we have no information on the direction.<\/li>\n<li><code>spellcheck<\/code> &#8211; is a boolean value which when set to <code>TRUE<\/code> shows that the element is to have it&#8217;s grammar and spelling checked, and to be left as it is in case it&#8217;s set to <code>FALSE<\/code>. It&#8217;s value can be inherited from the parent element of which the &lt;textarea&gt; element is descended.<\/li>\n<li><code>wrap<\/code> &#8211; is an attribute that indicates how the control wraps text. It can have two values: <code>hard<\/code> and <code>soft<\/code>. The first one inserts a line break so that each line has no more character than the width of the control, which is also why setting the attribute to this value, you will have to also specify the <code>cols<\/code> value. The second one, <code>soft<\/code>, is also the default value for <code>wrap<\/code> in case it&#8217;s left unspecified, and is used to show the browser that it&#8217;s to respect any line break pair (CR+LF) but not insert any on it&#8217;s own accord.  <\/li>\n<\/ul>\n<p>With that, we have explained the most used and most important attributes regarding the &lt;textarea&gt; element.<\/p>\n<h2>3. &lt;textarea&gt; methods <\/h2>\n<p>Except for all the attributes that will help us set a &lt;textarea&gt; element just the way we need it to work, there are also a number of Javascript methods related to it which need to be used in order to make it all work. Some of the most important ones are:<\/p>\n<ul>\n<li><code>select()<\/code> &#8211; selects all the contents of the control<\/li>\n<li><code>focus()<\/code> &#8211; similarly to the <code>focus<\/code> attribute, this method gives input focus to the control<\/li>\n<li><code>blur()<\/code> &#8211; reverses the effect of <code>focus()<\/code>, which means that it removes input focus to the control. This method and also <code>focus()<\/code> are inherited from the HTMLElement interface starting from HTML5 and on, but needed to be defined in earlier versions. <\/li>\n<li><code>checkValidity()<\/code> &#8211; this method returns a boolean value as it&#8217;s final result. This value would be <code>TRUE<\/code> in the cases where the control is not a candidate for constraint validation or it&#8217;s criteria is fulfilled, and <code>FALSE<\/code> when these constraints are not fulfilled. <\/li>\n<li><code>setCustomValidity()<\/code> &#8211; would return a custom string (presumably hinting at what&#8217;s wrong) in case the validity criteria is not met, and a void string if everything is as it should be.<\/li>\n<\/ul>\n<p>By now you know a lot about the &lt;textarea&gt; element, including a great number of it&#8217;s attributes and methods. However some of you might still have some difficulty understanding this element. The best way to clear your doubts? Why, practice, of course. Time for some examples!<\/p>\n<h2>4. Creating a simple &lt;textarea&gt; element<\/h2>\n<p>There are two ways to create a very basic textarea: using only Javascript and using the &lt;textarea&gt; tag. Let&#8217;s see them both in action below!<\/p>\n<h3>4.1 Using Javascript<\/h3>\n<p>To create a textarea using strictly plain Javascript we would only need the function which does this and something to trigger it&#8217;s execution, which can be either a button being pressed or anything, really. As usual, we will separate the Javascript and  HTML parts of our code, even though in our case it&#8217;s not strictly necessary. That&#8217;s because it&#8217;s good programming practice in case you have large chunks of code to deal with!<\/p>\n<p>The heart of it, of course, would be the Javascript code, which we will place in a separate file named <code>textarea.js<\/code> simply like below, without any tags or anything else. Just the code!<\/p>\n<p><span style=\"text-decoration: underline\"><em>textarea.js<\/em><\/span><\/p>\n<pre class=\"brush:js\">\r\nfunction createOurTextarea() {\r\n    var ourElement = document.createElement(\"TEXTAREA\");\r\n    var ourElementText = document.createTextNode(\"This is our TextArea!\");\r\n    ourElement.appendChild(ourElementText);\r\n    document.body.appendChild(ourElement);\r\n}\r\n<\/pre>\n<p>It is pretty simple to understand what we&#8217;ve done here: We create a textarea element, create a text node for it and append it to the first one, and lastly, append these two both to the document body. All this is wrapped into a function, which we will use to trigger the textarea. We would do that by clicking a button which fires this function as soon as it&#8217;s clicked. The HTML code would go like below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>textarea.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"UTF-8\"&gt;\r\n    &lt;title&gt;Textarea&lt;\/title&gt;\r\n    &lt;script src=\"textarea.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;button onclick=\"createOurTextarea()\"&gt;Create TextArea&lt;\/button&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>There you have it!<\/p>\n<h3>4.2 Using the &lt;textarea&gt; tag<\/h3>\n<p>I think that all would agree with me in saying that the easiest way to create a textarea element would be through using the tag and some of the attributes for this element according to the needs we have. Of course, later on we can add more functionality to it using Javascript functions, but for now, to create it, we would only need the code snippet below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>textarea.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"UTF-8\"&gt;\r\n    &lt;title&gt;Textarea&lt;\/title&gt;\r\n    &lt;script src=\"textarea.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;textarea name=\"comments\" cols=\"40\" rows=\"6\"&gt;&lt;\/textarea&gt; \r\n\r\n&lt;p&gt;&lt;input type=SUBMIT value=\"submit\"&gt;&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>As you can see, we only used the tag together with three of the attributes explained above: <code>name<\/code>, <code>cols<\/code> and <code>rows<\/code>. Also, we used a submit button, which we do not strictly need for the textarea, but is usually there to submit the info. However, usually we only have one submit button for all the form.<\/p>\n<h2>5. Getting data from the textarea<\/h2>\n<p>A common action regarding textareas is getting the data from them and manipulating it. Let&#8217;s see how we can get it and then display it for the user. The HTML code would go like below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>textarea.html<\/em><\/span><\/p>\n<pre class=\"brush:xml\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n    &lt;meta charset=\"UTF-8\"&gt;\r\n    &lt;title&gt;Textarea&lt;\/title&gt;\r\n    &lt;script src=\"textarea.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\nData:\r\n&lt;br&gt;\r\n&lt;textarea name=\"comments\" id=\"myTextarea\" cols=\"40\" rows=\"6\"&gt;Suppose we have this text!&lt;\/textarea&gt;\r\n\r\n&lt;br&gt;\r\n&lt;button type=\"button\" onclick=\"getAndDisplay()\"&gt;Get Textarea Data&lt;\/button&gt;\r\n\r\n&lt;br&gt;\r\nDisplay Data:\r\n&lt;br&gt;\r\n&lt;p id=\"display\"&gt;&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>In the code above we have kept the textarea we created (and discarded the submit button) and added it an <code>id<\/code> attribute with the value <code>myTextarea<\/code>. For ease of use, our textarea is not empty. <\/p>\n<p>Then, we have created a button which when clicked invokes the function <code>getAndDisplay()<\/code>, which we will explain later on. Then we have placed a paragraph with an <code>id<\/code> of <code>display<\/code>, both of which will be used in the function.<\/p>\n<p>The Javascript code would go like below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>textarea.js<\/em><\/span><\/p>\n<pre class=\"brush:js\">\r\nfunction getAndDisplay() {\r\n    var x = document.getElementById(\"myTextarea\").value;\r\n    document.getElementById(\"display\").innerHTML = x;\r\n}\r\n<\/pre>\n<p>As you see, we only have to get the value of our textarea element by using it&#8217;s ID, and then pass it to the innerHTML of another element, which we&#8217;ve chosen to be the paragraph with the ID value of <code>display<\/code>. Easy, right?<\/p>\n<h2>6. Download the source code <\/h2>\n<p>This was an example of Textareas in Javascript.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>You can download the full source code of this example here: <strong><a><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2016\/03\/Textarea.zip\">Textarea<\/a><\/a><\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use a text-area field for the argumentation. It is a highly convenient feature of Javascript, and if you now want to add it to your own website, I would &hellip;<\/p>\n","protected":false},"author":25,"featured_media":920,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-11674","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Javascript Textarea Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Javascript Textarea Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/era.balliu.7\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-30T13:15:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-10T14:26:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Era Balliu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BalliuEra\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Era Balliu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\"},\"author\":{\"name\":\"Era Balliu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\"},\"headline\":\"Javascript Textarea Example\",\"datePublished\":\"2016-03-30T13:15:50+00:00\",\"dateModified\":\"2018-01-10T14:26:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\"},\"wordCount\":1816,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\",\"name\":\"Javascript Textarea Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"datePublished\":\"2016-03-30T13:15:50+00:00\",\"dateModified\":\"2018-01-10T14:26:25+00:00\",\"description\":\"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Javascript Textarea Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\",\"name\":\"Era Balliu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"caption\":\"Era Balliu\"},\"description\":\"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.\",\"sameAs\":[\"http:\/\/www.webcodegeeks.com\/\",\"https:\/\/www.facebook.com\/era.balliu.7\",\"https:\/\/www.instagram.com\/eraballiu\/\",\"https:\/\/www.linkedin.com\/in\/eraballiu\",\"https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/\",\"https:\/\/x.com\/BalliuEra\",\"https:\/\/www.youtube.com\/c\/eraballiu\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Javascript Textarea Example - Web Code Geeks - 2026","description":"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/","og_locale":"en_US","og_type":"article","og_title":"Javascript Textarea Example - Web Code Geeks - 2026","og_description":"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/era.balliu.7","article_published_time":"2016-03-30T13:15:50+00:00","article_modified_time":"2018-01-10T14:26:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","type":"image\/jpeg"}],"author":"Era Balliu","twitter_card":"summary_large_image","twitter_creator":"@BalliuEra","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Era Balliu","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/"},"author":{"name":"Era Balliu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e"},"headline":"Javascript Textarea Example","datePublished":"2016-03-30T13:15:50+00:00","dateModified":"2018-01-10T14:26:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/"},"wordCount":1816,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/","name":"Javascript Textarea Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","datePublished":"2016-03-30T13:15:50+00:00","dateModified":"2018-01-10T14:26:25+00:00","description":"If you have applied somewhere online, or asked for a particular thing using the contact forms of the websites, you will most probably have seen those use","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/js-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/javascript-textarea-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Javascript Textarea Example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e","name":"Era Balliu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","caption":"Era Balliu"},"description":"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.","sameAs":["http:\/\/www.webcodegeeks.com\/","https:\/\/www.facebook.com\/era.balliu.7","https:\/\/www.instagram.com\/eraballiu\/","https:\/\/www.linkedin.com\/in\/eraballiu","https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/","https:\/\/x.com\/BalliuEra","https:\/\/www.youtube.com\/c\/eraballiu"],"url":"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=11674"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/11674\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/920"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=11674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=11674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=11674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}