MAXLENGTH EM TEXTAREA COM JQUERY
Hoje eu irei mostrar como limitar o tamanho de textareas com um simples código jquery.
Sabemos que inputs do tipo text tem a propriedade maxlength e também sabemos que textareas não tem, mas com um código jquery podemos trabalhar como se existisse maxlength em textareas.
Para fazermos isso é simples.
Precisamos de um textarea com maxlength.
<textareamaxlength="15"rows="5"cols="30"name="texto"></textarea>
Após devemos adicionar no seu javascript o seguinte código:
$("textarea[maxlength]").keypress(function(event){var key = event.which;//todas as teclas incluindo enterif(key >= 33 || key == 13) {var maxLength = $(this).attr("maxlength");var length = this.value.length;if(length >= maxLength) {event.preventDefault();}}});
Xo สล็อตออนไลน์ โปรสล็อต XO เกมออนไลน์ทำเงินยอดฮิตเกมสล็อต xopg.net คือเกมทำเงิน reeffutures2018 ผ่านทางออนไลน์อย่างหนึ่ง ที่เล่นง่าย และได้เงินไว แถมยังลงทุนด้วยเงินน้อย mavoixtavoie ทำเงินได้ตลอดเวลา ซึ่งหลายคนอาจได้เคยเห็นรีวิวเรื่องของ สล็อต xo สล็อตออนไลน์ ไว้มากมาย เทคนิคสล็อต ทั้งเรื่องการเล่นแล้วได้เงิน herbalpertpresents และเล่น สล็อต แล้วไม่ได้เงิน นั่นเองค่ะ ซึ่งการที่คุณจะเล่นได้เงินหรือไม่ได้เงินนั้น essentialsforasoul ส่วนหนึ่งก็เป็นในเรื่องของดวงเข้ามาเกี่ยวด้วย northbristol เพราะสล็อตเป็นเกมออนไลน์เสี่ยงโชค ทดลองเล่น xo เกมหนึ่งซึ่งจะมีสูตร หรือเทคนิคเข้ามาช่วย gclub เพื่อโกงดวงอยู่เสมอซึ่งในเว็บของเรา สมัคร xo ก็มีมาแนะนำไว้ให้เห็นกันมากมายหลายสูตร
I also wrote an article on a similar subject will find it at write what you think. 사설토토
I personally use them exclusively high-quality elements : you will notice these folks during: 안전놀이터
The most interesting text on this interesting topic that can be found on the net ... 벳삼
Awesome dispatch! I am indeed getting apt to over this info, is truly neighborly my buddy. Likewise fantastic blog here among many of the costly info you acquire. Reserve up the beneficial process you are doing here. 토토커뮤니티
The most interesting text on this interesting topic that can be found on the net ... 꽁머니사이트
For many people this is the best solution here see how to do it. 링크찾기
I prefer merely excellent resources - you will see these people in: 링크찾기
You should mainly superior together with well-performing material, which means that see it: 링크사이트
We still cannot quite believe that I really could often be type checking important points available on your webblog. My in laws and that i are sincerely thankful on your generosity and then for giving me possibility pursue our chosen profession path. Published you information I became of the web-site. 토토사이트
I’d must talk to you here. Which is not some thing Which i do! I like reading an article that can make people believe. Also, thank you for permitting me to comment! 먹튀인증
Do you mind generally if I mention two of your content material for as long as I give you credit in addition to sources returning to your web site? My webpage is in the exact same niche as your site and my viewers would certainly have the benefit of several of the additional info you actually provide at this site. Please inform me if this is okay for you. Thank you! 토토커뮤니티
I beloved as much as you will receive carried out right here. The comic strip is attractive, your authored subject matter stylish. nevertheless, you command get got an shakiness over that you would like be delivering the following. unwell undoubtedly come further beforehand once more since precisely the similar nearly a lot steadily within case you protect this hike. 꽁머니
Then using a razor, begin in the top rated plus shave lower with all the grain fostering in the backside : it’s recommended to take precisely what you’re executing using a modest reflect. 홈런 토토
The the next time Someone said a blog, I am hoping so it doesnt disappoint me up to this blog. What i’m saying is, Yes, it was my option to read, but I really thought youd have something intriguing to state. All I hear can be a few whining about something that you could fix if you ever werent too busy searching for attention. 꽁머니
This will be a terrific blog, would you be interested in doing an interview about just how you developed it? If so e-mail me! 바이낸스 토토
While I enjoy the actual analysis part of your smart phone market posts, you often sound like an Embittered Old Fart Apple haterboy. 꽁머니사이트
Cool you write, the information is very good and interesting, I'll give you a link to my site. 토토커뮤니티
Make the most of mainly premium substances - you will find him or her for: 토토커뮤니티
very good put up, i definitely love this web site, keep on it 먹튀검증