[javascript] textarea 글자 제한 2017년 07월 28일 golgol [Dev]Javascript 0 textarea 글자 제한 원본소스 다운로드 : textarea-maxlength Example 1 – (This is the default without any config) dfdsfsd Code used There is no javascript configuration used in this example. By setting a maxlength property for the textarea, example: C# <textarea name="myComment" id="myComment" maxLength="10" cols="50 rows="3"> 123 <textarea name="myComment" id="myComment" maxLength="10" cols="50 rows="3"> and by including the dg-textarea-maxlength-autoload.js file, C# <script type="text/javascript" src="js/dg-textarea-maxlength-autoload.js"></script> 123 <script type="text/javascript" src="js/dg-textarea-maxlength-autoload.js"></script> you will get a default config for all textareas where the maxlength attribute is set Example 2 : Manual config dfsdfsdf 56 of maximum 255 characters Code used: C# var maxLength = new DG.TextareaMaxlength( { el : 'poem', statusEl : 'poem-maxlength-status', maxLength : 255, statusText : '{0} of maximum {1} characters' }) 123456789 var maxLength = new DG.TextareaMaxlength( { el : 'poem', statusEl : 'poem-maxlength-status', maxLength : 255, statusText : '{0} of maximum {1} characters' })