{"id":5024,"date":"2017-07-28T11:15:01","date_gmt":"2017-07-28T02:15:01","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=5024"},"modified":"2020-06-02T09:35:40","modified_gmt":"2020-06-02T00:35:40","slug":"javascript-textarea-%ea%b8%80%ec%9e%90-%ec%a0%9c%ed%95%9c","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=5024","title":{"rendered":"[javascript] textarea \uae00\uc790 \uc81c\ud55c"},"content":{"rendered":"<p>textarea \uae00\uc790 \uc81c\ud55c \uc6d0\ubcf8\uc18c\uc2a4 \ub2e4\uc6b4\ub85c\ub4dc : \u00a0<a href=\"https:\/\/auctionpro.co.kr\/wp-content\/uploads\/2017\/07\/textarea-maxlength.zip\">textarea-maxlength<\/a><\/p>\n<p>&nbsp;<\/p>\n<form>\n<h2>Example 1 &#8211; (This is the default without any config)<\/h2>\n<p><textarea id=\"myComment\" style=\"margin-top: 0px; margin-bottom: 0px; height: 47px;\" cols=\"50\" maxlength=\"10\" name=\"myComment\">dfdsfsd<\/textarea><\/p>\n<div id=\"myComment-maxlength-status\"><\/div>\n<p><b>Code used<\/b><\/p>\n<p>There is no javascript configuration used in this example. By setting a maxlength property for the textarea, example:<\/p>\n<pre> <textarea name=\"myComment\" id=\"myComment\" maxLength=\"10\" cols=\"50 rows=\"3\">\r\n<\/pre>\n<p>and by including the dg-textarea-maxlength-autoload.js file,<\/p>\n<pre><script type=\"text\/javascript\" src=\"js\/dg-textarea-maxlength-autoload.js\"><\/script>\r\n<\/pre>\n<p>you will get a default config for all textareas where the maxlength attribute is set<\/p>\n<h2>Example 2 : Manual config<\/h2>\n<p><textarea id=\"poem\" cols=\"30\" name=\"poem\" rows=\"15\">dfsdfsdf<\/textarea><\/p>\n<div id=\"poem-maxlength-status\">56 of maximum 255 characters<\/div>\n<p><b>Code used:<\/b><\/p>\n<pre>var maxLength = new DG.TextareaMaxlength( {\r\n\tel : 'poem',\r\n\tstatusEl : 'poem-maxlength-status',\r\n\tmaxLength : 255,\r\n\tstatusText : '{0} of maximum {1} characters'\r\n\r\n})\r\n<\/pre>\n<p><script type=\"text\/javascript\">\nvar maxLength = new DG.TextareaMaxlength( {\n\tel : 'poem',\n\tstatusEl : 'poem-maxlength-status',\n\tmaxLength : 255,\n\tstatusText : '{0} of maximum {1} characters'<\/p>\n<p>})\n<\/script><\/p>\n<\/form>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>textarea \uae00\uc790 \uc81c\ud55c \uc6d0\ubcf8\uc18c\uc2a4 \ub2e4\uc6b4\ub85c\ub4dc : \u00a0textarea-maxlength &nbsp; Example 1 &#8211; (This is the default without any config) dfdsfsd Code used There is no javascript <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=5024\" title=\"[javascript] textarea \uae00\uc790 \uc81c\ud55c\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[32],"tags":[],"class_list":["post-5024","post","type-post","status-publish","format-standard","hentry","category-javascript"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5024"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/5024\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5024"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5024"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}