{"id":804,"date":"2012-06-06T11:12:29","date_gmt":"2012-06-06T11:12:29","guid":{"rendered":"https:\/\/theextremewebdesigns.com\/blog\/?p=804"},"modified":"2012-06-06T11:12:29","modified_gmt":"2012-06-06T11:12:29","slug":"jquery-empty-input-textbox-textarea","status":"publish","type":"post","link":"https:\/\/theextremewebdesigns.com\/blog\/jquery-empty-input-textbox-textarea\/","title":{"rendered":"jQuery Empty Input Textbox | Textarea"},"content":{"rendered":"<p>Did you want to clear the existing value of a form input i.e. <em><strong>clear Texbox and\/or Textarea values using jQuery<\/strong><\/em>? It is very simple to do so. You can do it using just 1 line of code. Follow along.<!--more--><\/p>\n<h2>How to Empty Input Textbox, Textarea using jQuery<\/h2>\n<p>Le&#8217;ts assume that you an input Textbox with ID &#8220;city&#8221; and a Textarea with ID &#8220;comments&#8221;.<\/p>\n<h3>Example: Empty Textbox using jQuery<\/h3>\n<pre class=\"lang:js decode:true\">$('#city').val('');<\/pre>\n<h3>Example: Empty Textarea using jQuery<\/h3>\n<pre class=\"lang:js decode:true\">$('#comments').val('');<\/pre>\n<h5>Very simple, isn&#8217;t it?<\/h5>\n<p>Do you know of any other ways to <em><strong>empty input textbox \/ textarea using jQuery<\/strong><\/em>? Feel free to suggest by commenting below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you want to clear the existing value of a form input i.e. clear Texbox and\/or Textarea values using jQuery? It is very simple to do so. You can do it using just 1 line of code. Follow along.<\/p>\n","protected":false},"author":1,"featured_media":395,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[20,13],"tags":[41],"class_list":["post-804","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery-tips-and-tricks","category-tips-and-tricks","tag-jquery-tips"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paBnQX-cY","jetpack_sharing_enabled":true,"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/804","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/comments?post=804"}],"version-history":[{"count":0,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/posts\/804\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/media?parent=804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/categories?post=804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theextremewebdesigns.com\/blog\/wp-json\/wp\/v2\/tags?post=804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}